提出 #777462


ソースコード 拡げる

#include<iostream>
#include<vector>
#include<algorithm>
#include<string>

using namespace std;

#define REP(i,n) for(int i=0;i<(n);i++)

int main(void){
	int n,q;cin>>n>>q;
	vector<int> vec(n+1,0);
	REP(i,q){
		int l,r;cin>>l>>r;
		vec[l-1]++;
		vec[r]--;
	}
	REP(i,n){
		vec[i+1]+=vec[i];
	}
	REP(i,n){
		cout<<(vec[i]&1);
	}
	cout<<endl;
	return 0;
}

提出情報

提出日時
問題 C - オセロ
ユーザ ish_774
言語 C++14 (GCC 5.4.1)
得点 100
コード長 379 Byte
結果 AC
実行時間 245 ms
メモリ 1280 KiB

ジャッジ結果

セット名 Sample Subtask1 All
得点 / 配点 0 / 0 60 / 60 40 / 40
結果
AC × 2
AC × 12
AC × 34
セット名 テストケース
Sample 00_example_01.txt, 00_example_02.txt
Subtask1 00_example_01.txt, 00_example_02.txt, 10_small_01.txt, 10_small_02.txt, 10_small_03.txt, 10_small_04.txt, 10_small_05.txt, 10_small_06.txt, 10_small_07.txt, 10_small_08.txt, 10_small_09.txt, 10_small_10.txt
All 00_example_01.txt, 00_example_02.txt, 10_small_01.txt, 10_small_02.txt, 10_small_03.txt, 10_small_04.txt, 10_small_05.txt, 10_small_06.txt, 10_small_07.txt, 10_small_08.txt, 10_small_09.txt, 10_small_10.txt, 20_rand_01.txt, 20_rand_02.txt, 20_rand_03.txt, 20_rand_04.txt, 20_rand_05.txt, 20_rand_06.txt, 20_rand_07.txt, 20_rand_08.txt, 20_rand_09.txt, 20_rand_10.txt, 30_max_01.txt, 30_max_02.txt, 30_max_03.txt, 30_max_04.txt, 30_max_05.txt, 40_corner_01.txt, 40_corner_02.txt, 40_corner_03.txt, 40_corner_04.txt, 40_corner_05.txt, 40_corner_06.txt, 40_corner_07.txt
ケース名 結果 実行時間 メモリ
00_example_01.txt AC 4 ms 256 KiB
00_example_02.txt AC 4 ms 256 KiB
10_small_01.txt AC 5 ms 256 KiB
10_small_02.txt AC 4 ms 256 KiB
10_small_03.txt AC 4 ms 256 KiB
10_small_04.txt AC 4 ms 256 KiB
10_small_05.txt AC 4 ms 256 KiB
10_small_06.txt AC 4 ms 256 KiB
10_small_07.txt AC 4 ms 256 KiB
10_small_08.txt AC 4 ms 256 KiB
10_small_09.txt AC 4 ms 256 KiB
10_small_10.txt AC 4 ms 256 KiB
20_rand_01.txt AC 101 ms 512 KiB
20_rand_02.txt AC 27 ms 256 KiB
20_rand_03.txt AC 21 ms 768 KiB
20_rand_04.txt AC 59 ms 384 KiB
20_rand_05.txt AC 26 ms 256 KiB
20_rand_06.txt AC 57 ms 512 KiB
20_rand_07.txt AC 18 ms 768 KiB
20_rand_08.txt AC 7 ms 384 KiB
20_rand_09.txt AC 36 ms 256 KiB
20_rand_10.txt AC 19 ms 384 KiB
30_max_01.txt AC 196 ms 1152 KiB
30_max_02.txt AC 197 ms 1280 KiB
30_max_03.txt AC 204 ms 1152 KiB
30_max_04.txt AC 200 ms 1280 KiB
30_max_05.txt AC 200 ms 1280 KiB
40_corner_01.txt AC 111 ms 256 KiB
40_corner_02.txt AC 192 ms 1152 KiB
40_corner_03.txt AC 190 ms 1152 KiB
40_corner_04.txt AC 245 ms 1280 KiB
40_corner_05.txt AC 152 ms 1152 KiB
40_corner_06.txt AC 111 ms 256 KiB
40_corner_07.txt AC 188 ms 1280 KiB