結果
| 問題 | No.101 ぐるぐる!あみだくじ! | 
| コンテスト | |
| ユーザー |  hotpepsi | 
| 提出日時 | 2015-08-30 00:45:42 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 338 bytes | 
| コンパイル時間 | 468 ms | 
| コンパイル使用メモリ | 57,824 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-07-18 15:36:59 | 
| 合計ジャッジ時間 | 1,654 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 4 WA * 33 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <sstream>
#include <numeric>
using namespace std;
int main(int argc, char *argv[])
{
	int N, K;
	int f[1000] = {};
	cin >> N >> K;
	for (int i = 0; i < K; ++i) {
		int x, y;
		cin >> x >> y;
		f[x - 1] ^= 1;
	}
	int ans = accumulate(f, f + N, 0) + 1;
	cout << ans << endl;
	return 0;
}
            
            
            
        