# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
12851 |
2015-01-10T21:24:18 Z |
yongwhan |
백신 (KOI13_vaccine) |
C++ |
|
1000 ms |
262144 KB |
#include<iostream>
#include<set>
#include<map>
#include<vector>
using namespace std;
int main() {
ios_base::sync_with_stdio(false); cin.tie(NULL);
int n,k,m; cin>>n>>k;
map<vector<int>, set<int> > mp;
for (int c=0; c<n; c++) {
cin>>m; vector<int> v(m);
for (int i=0; i<m; i++) cin>>v[i];
for (int j=0; j<2; j++) {
if(j) for (int i=0; i<m/2; i++) swap(v[i], v[m-1-i]);
for (int i=0; i<m; i++) {
vector<int> cur;
for (int j=i; j<m; j++) {
cur.push_back(v[j]);
int sz=cur.size();
if(sz>=k) mp[cur].insert(c);
}
}
}
}
for(map<vector<int>, set<int> >::iterator it=mp.begin(); it!=mp.end(); it++)
if((int)(*it).second.size()==n)
{ cout << "YES" << endl; return 0; }
cout << "NO" << endl;
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
1676 KB |
Output is correct |
2 |
Correct |
0 ms |
1808 KB |
Output is correct |
3 |
Correct |
0 ms |
1808 KB |
Output is correct |
4 |
Correct |
0 ms |
1940 KB |
Output is correct |
5 |
Correct |
0 ms |
1808 KB |
Output is correct |
6 |
Correct |
0 ms |
1808 KB |
Output is correct |
7 |
Correct |
0 ms |
1808 KB |
Output is correct |
8 |
Correct |
0 ms |
1676 KB |
Output is correct |
9 |
Correct |
0 ms |
1676 KB |
Output is correct |
10 |
Correct |
0 ms |
2468 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
2072 KB |
Output is correct |
2 |
Correct |
0 ms |
2336 KB |
Output is correct |
3 |
Correct |
0 ms |
2336 KB |
Output is correct |
4 |
Correct |
0 ms |
1940 KB |
Output is correct |
5 |
Correct |
0 ms |
2204 KB |
Output is correct |
6 |
Correct |
0 ms |
2336 KB |
Output is correct |
7 |
Correct |
0 ms |
2336 KB |
Output is correct |
8 |
Correct |
0 ms |
1676 KB |
Output is correct |
9 |
Correct |
4 ms |
2864 KB |
Output is correct |
10 |
Correct |
4 ms |
2732 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
2468 KB |
Output is correct |
2 |
Correct |
20 ms |
8276 KB |
Output is correct |
3 |
Correct |
16 ms |
5504 KB |
Output is correct |
4 |
Correct |
76 ms |
14876 KB |
Output is correct |
5 |
Correct |
4 ms |
2732 KB |
Output is correct |
6 |
Correct |
20 ms |
8144 KB |
Output is correct |
7 |
Correct |
20 ms |
8012 KB |
Output is correct |
8 |
Correct |
24 ms |
1808 KB |
Output is correct |
9 |
Correct |
40 ms |
1808 KB |
Output is correct |
10 |
Correct |
492 ms |
99620 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
180 ms |
32828 KB |
Output is correct |
2 |
Correct |
300 ms |
70444 KB |
Output is correct |
3 |
Correct |
324 ms |
80084 KB |
Output is correct |
4 |
Correct |
88 ms |
24248 KB |
Output is correct |
5 |
Correct |
192 ms |
51296 KB |
Output is correct |
6 |
Correct |
304 ms |
78236 KB |
Output is correct |
7 |
Correct |
292 ms |
76256 KB |
Output is correct |
8 |
Correct |
40 ms |
1808 KB |
Output is correct |
9 |
Correct |
812 ms |
143576 KB |
Output is correct |
10 |
Correct |
768 ms |
137240 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1000 ms |
262144 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1000 ms |
262144 KB |
Program timed out |
2 |
Halted |
0 ms |
0 KB |
- |