Submission #267151

#TimeUsernameProblemLanguageResultExecution timeMemory
267151Kenzo_1114Triangles (CEOI18_tri)C++17
0 / 100
1 ms256 KiB
#include<bits/stdc++.h> #include"trilib.h" using namespace std; const int MAXN = 40010; /* int get_n() { int aux; scanf("%d", &aux); return aux; } bool is_clockwise(int a, int b, int c) { char aux; printf("? %d %d %d\n", a, b, c); scanf(" %c", &aux); return (aux == 'y'); } void give_answer(int s) { printf("%d\n", s); } */ int main () { int n = get_n(); int ans = 0; for(int a = 1; a <= n; a++) { for(int b = 1; b <= n; b++) { if(a == b) continue; bool ok = true, ok2 = false; for(int c = 1; c <= n; c++) { if(a == c || b == c) continue; ok2 = true; ok = ok && is_clockwise(a, b, c); } ans += (ok && ok2); } } give_answer(ans / 2); }
#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...