AtCoder Beginner Contest 014

Submission #3972520

Source codeソースコード

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

#define EPS (1e-7)
#define INF (1e9)
#define PI (acos(-1))
//const ll mod = 1000000007;
int field[1000200];
int main() {
    //cout.precision(10);
    int n;
    cin >> n;
    for(int i = 0; i < n; i++){
        int a, b;
        cin >> a >> b;
        field[a]++;
        field[b + 1]--;
    }
    for(int i = 0; i <= 1000000; i++){
        field[i + 1] += field[i];
    }
    int ans = 0;
    for(int i = 1; i <= 1000000; i++){
        ans = max(ans, field[i]);
    }
    cout << ans << endl;
    return 0;
}

Submission

Task問題 C - AtColor
User nameユーザ名 kort0n
Created time投稿日時
Language言語 C++14 (GCC 5.4.1)
Status状態 WA
Score得点 0
Source lengthソースコード長 609 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Sample - subtask0_sample01.txt,subtask0_sample02.txt
Subtask1 0 / 30 subtask1_01.txt,subtask1_02.txt,subtask1_03.txt,subtask1_04.txt,subtask1_05.txt,subtask1_06.txt,subtask1_07.txt,subtask1_08.txt,subtask1_09.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt,subtask1_15.txt,subtask0_sample01.txt,subtask0_sample02.txt
Subtask2 0 / 70 subtask0_sample01.txt,subtask0_sample02.txt,subtask1_01.txt,subtask1_02.txt,subtask1_03.txt,subtask1_04.txt,subtask1_05.txt,subtask1_06.txt,subtask1_07.txt,subtask1_08.txt,subtask1_09.txt,subtask1_10.txt,subtask1_11.txt,subtask1_12.txt,subtask1_13.txt,subtask1_14.txt,subtask1_15.txt,subtask2_01.txt,subtask2_02.txt,subtask2_03.txt,subtask2_04.txt,subtask2_05.txt,subtask2_06.txt,subtask2_07.txt,subtask2_08.txt,subtask2_09.txt,subtask2_10.txt,subtask2_11.txt,subtask2_12.txt,subtask2_13.txt,subtask2_14.txt,subtask2_15.txt,subtask2_16.txt,subtask2_17.txt,subtask2_18.txt,subtask2_19.txt,subtask2_20.txt,subtask2_21.txt,subtask2_22.txt,subtask2_23.txt,subtask2_24.txt,subtask2_25.txt

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
subtask0_sample01.txt AC 5 ms 4096 KB
subtask0_sample02.txt AC 5 ms 4096 KB
subtask1_01.txt AC 5 ms 4096 KB
subtask1_02.txt WA
subtask1_03.txt AC 7 ms 4096 KB
subtask1_04.txt AC 7 ms 4096 KB
subtask1_05.txt AC 7 ms 4096 KB
subtask1_06.txt AC 7 ms 4096 KB
subtask1_07.txt AC 7 ms 4096 KB
subtask1_08.txt AC 6 ms 4096 KB
subtask1_09.txt AC 6 ms 4096 KB
subtask1_10.txt AC 6 ms 4096 KB
subtask1_11.txt AC 6 ms 4096 KB
subtask1_12.txt AC 6 ms 4096 KB
subtask1_13.txt AC 6 ms 4096 KB
subtask1_14.txt AC 6 ms 4096 KB
subtask1_15.txt AC 6 ms 4096 KB
subtask2_01.txt AC 66 ms 4096 KB
subtask2_02.txt AC 85 ms 4096 KB
subtask2_03.txt AC 64 ms 4096 KB
subtask2_04.txt AC 81 ms 4096 KB
subtask2_05.txt AC 77 ms 4096 KB
subtask2_06.txt AC 87 ms 4096 KB
subtask2_07.txt AC 84 ms 4096 KB
subtask2_08.txt AC 89 ms 4096 KB
subtask2_09.txt AC 85 ms 4096 KB
subtask2_10.txt AC 87 ms 4096 KB
subtask2_11.txt AC 83 ms 4096 KB
subtask2_12.txt AC 86 ms 4096 KB
subtask2_13.txt AC 83 ms 4096 KB
subtask2_14.txt AC 92 ms 4096 KB
subtask2_15.txt AC 89 ms 4096 KB
subtask2_16.txt AC 89 ms 4096 KB
subtask2_17.txt AC 86 ms 4096 KB
subtask2_18.txt AC 85 ms 4096 KB
subtask2_19.txt AC 90 ms 4096 KB
subtask2_20.txt AC 87 ms 4096 KB
subtask2_21.txt AC 84 ms 4096 KB
subtask2_22.txt AC 85 ms 4096 KB
subtask2_23.txt AC 86 ms 4096 KB
subtask2_24.txt AC 86 ms 4096 KB
subtask2_25.txt AC 86 ms 4096 KB