# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
145102 | 2019-08-18T18:58:10 Z | JeanAji | Lottery (CEOI18_lot) | C++14 | 3000 ms | 584 KB |
#include <bits/stdc++.h> using namespace std; int n,l,ans[100000],a[100000],q; int main() { int o; cin>>n>>l; for (int i=0;i<n;i++) scanf("%d",&a[i]); cin>>q; cin>>o; for (int i=0;i<n-l+1;i++) { for (int j=i+1;j<n-l+1;j++) { o=1; for (int k=0;k<l;k++) { if (a[k+i]!=a[j+k]) { o=0; break; } } if (o==1) { ans[i]++; ans[j]++; } } } for (int i=0;i<n-l+1;i++) cout<<ans[i]<<" "; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 376 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 376 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 392 ms | 444 KB | Output is correct |
2 | Correct | 422 ms | 504 KB | Output is correct |
3 | Correct | 154 ms | 504 KB | Output is correct |
4 | Correct | 96 ms | 584 KB | Output is correct |
5 | Execution timed out | 3041 ms | 508 KB | Time limit exceeded |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 392 ms | 444 KB | Output is correct |
2 | Correct | 422 ms | 504 KB | Output is correct |
3 | Correct | 154 ms | 504 KB | Output is correct |
4 | Correct | 96 ms | 584 KB | Output is correct |
5 | Execution timed out | 3041 ms | 508 KB | Time limit exceeded |
6 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 2 ms | 376 KB | Output is correct |
2 | Incorrect | 2 ms | 376 KB | Output isn't correct |
3 | Halted | 0 ms | 0 KB | - |