제출 #1167427

#제출 시각아이디문제언어결과실행 시간메모리
1167427henriess카멜레온의 사랑 (JOI20_chameleon)C++20
0 / 100
16 ms432 KiB
#include "chameleon.h" #include <bits/stdc++.h> using namespace std; void Solve(int N) { //if N is less than 7 //I can brute force //N <= 7, that means //I can hold a meeting of 2 chameleons //if 1 chameleons likes the other chameleon and the other chameleon does not, there will be 1 distinct color //if both chameleons like each other, there will be 2 distinct colors //ok wtv let's do st 1 first, where the both chameleons love each other vector<pair<long long,long long>> pairs; for(int i = 1;i<=2* N;i++){ vector<int> qry(2); qry[0] = i; for(int j = i+1;j<=2 * N;j++){ qry[1] = j; long long r = Query(qry); if (r == 1){//that means 1 chameleon likes the other chameleon and that means both of them are originally different colors //or both chameleons have the same color //how do I differentiate between both situations //when both chameleons love each other, there will be 2 different colors pairs.push_back({i,j}); } } } for(int i = 0;i<pairs.size();i++){ Answer(pairs[i].first,pairs[i].second); } }
#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...