結果
問題 | No.921 ずんだアロー |
ユーザー | kotatsugame |
提出日時 | 2019-11-08 22:21:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 30 ms / 2,000 ms |
コード長 | 205 bytes |
コンパイル時間 | 631 ms |
コンパイル使用メモリ | 63,480 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-15 01:36:16 |
合計ジャッジ時間 | 1,756 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 22 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 4 | main() | ^~~~
ソースコード
#include<iostream> using namespace std; int N,A[1<<17]; main() { cin>>N; for(int i=0;i<N;i++)cin>>A[i]; int cnt=0; for(int i=0;i<N;i++) { cnt++; if(i+1<N&&A[i]!=A[i+1])i++; } cout<<cnt<<endl; }