# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
587110 |
2022-07-01T10:33:32 Z |
ygim |
Carnival (CEOI14_carnival) |
C++17 |
|
94 ms |
208 KB |
// P1_Carnival.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <climits>
#include <math.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0); cout.tie(0);
int n; cin >> n;
vector<int> costume(n, -1);
int t = 1;
for (int i = 0; i < n; i++)
{
if (costume[i] != -1) continue;
costume[i] = t;
for (int j = i + 1; j < n; j++)
{
if (costume[j] != -1) continue;
cout << 2 << " " << i+1 << " " << j+1 << endl;
int num; cin >> num;
if (num == 1) costume[j] = t;
}
t++;
}
cout << 0 << " ";
for (int i = 0; i < n; i++) cout << costume[i] << " ";
cout << endl;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
6 ms |
208 KB |
Output is correct |
2 |
Correct |
21 ms |
208 KB |
Output is correct |
3 |
Partially correct |
52 ms |
208 KB |
Partially correct |
4 |
Partially correct |
75 ms |
208 KB |
Partially correct |
5 |
Correct |
3 ms |
208 KB |
Output is correct |
6 |
Correct |
1 ms |
208 KB |
Output is correct |
7 |
Correct |
11 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
208 KB |
Output is correct |
2 |
Correct |
16 ms |
208 KB |
Output is correct |
3 |
Partially correct |
30 ms |
208 KB |
Partially correct |
4 |
Partially correct |
59 ms |
208 KB |
Partially correct |
5 |
Correct |
2 ms |
208 KB |
Output is correct |
6 |
Correct |
3 ms |
208 KB |
Output is correct |
7 |
Correct |
8 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
208 KB |
Output is correct |
2 |
Correct |
5 ms |
208 KB |
Output is correct |
3 |
Partially correct |
39 ms |
208 KB |
Partially correct |
4 |
Partially correct |
87 ms |
208 KB |
Partially correct |
5 |
Correct |
6 ms |
208 KB |
Output is correct |
6 |
Correct |
6 ms |
208 KB |
Output is correct |
7 |
Correct |
19 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
4 ms |
208 KB |
Output is correct |
2 |
Correct |
3 ms |
208 KB |
Output is correct |
3 |
Partially correct |
64 ms |
208 KB |
Partially correct |
4 |
Partially correct |
94 ms |
208 KB |
Partially correct |
5 |
Correct |
8 ms |
208 KB |
Output is correct |
6 |
Correct |
12 ms |
208 KB |
Output is correct |
7 |
Correct |
16 ms |
208 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
208 KB |
Output is correct |
2 |
Correct |
12 ms |
208 KB |
Output is correct |
3 |
Partially correct |
55 ms |
208 KB |
Partially correct |
4 |
Partially correct |
53 ms |
208 KB |
Partially correct |
5 |
Correct |
31 ms |
208 KB |
Output is correct |
6 |
Partially correct |
56 ms |
208 KB |
Partially correct |
7 |
Partially correct |
81 ms |
208 KB |
Partially correct |