Submission #587110

#TimeUsernameProblemLanguageResultExecution timeMemory
587110ygimCarnival (CEOI14_carnival)C++17
20 / 100
94 ms208 KiB
// 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...