# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
104306 | 2019-04-05T02:51:56 Z | LittleFlowers__ | Baloni (COCI15_baloni) | C++14 | 236 ms | 504 KB |
#include <iostream> using namespace std; int n,i,a,x; int c[1000005]; main(){ cin>>n; for(i=1;i<=n;++i){ cin>>a; if(!c[a]) x++; else c[a]--; c[a-1]++; } cout<<x; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 384 KB | Output is correct |
2 | Correct | 3 ms | 384 KB | Output is correct |
3 | Correct | 3 ms | 384 KB | Output is correct |
4 | Correct | 3 ms | 384 KB | Output is correct |
5 | Correct | 198 ms | 504 KB | Output is correct |
6 | Correct | 236 ms | 384 KB | Output is correct |
7 | Correct | 205 ms | 376 KB | Output is correct |
8 | Correct | 184 ms | 504 KB | Output is correct |
9 | Correct | 173 ms | 256 KB | Output is correct |
10 | Correct | 226 ms | 368 KB | Output is correct |