結果
問題 |
No.182 新規性の虜
|
ユーザー |
|
提出日時 | 2018-04-20 21:09:18 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 317 bytes |
コンパイル時間 | 543 ms |
コンパイル使用メモリ | 64,856 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 05:17:11 |
合計ジャッジ時間 | 2,423 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 WA * 13 |
ソースコード
#include<iostream> using namespace std; int main(){ int n; cin >> n; int A[n+2] = {}; for(int i = 1; i <= n; i++) cin >> A[i]; int res = 0; for(int i = 1; i <= n; i++){ if(A[i-1] != A[i] && A[i] != A[i+1]){ res++; } } cout << res << endl; return 0; }