제출 #822949

#제출 시각아이디문제언어결과실행 시간메모리
822949MohamedAhmed04Triangles (CEOI18_tri)C++14
15 / 100
59 ms2004 KiB
#include "trilib.h" #include <bits/stdc++.h> using namespace std ; const int MAX = 50 + 10 ; int N ; int mark[MAX][MAX][MAX] ; int main() { N = get_n() ; for(int i = 1 ; i <= N ; ++i) { for(int j = 1 ; j <= N ; ++j) { for(int k = 1 ; k <= N ; ++k) { if(i == j || i == k || j == k) continue ; mark[i][j][k] = is_clockwise(i , j , k) ; } } } int ans = 0 ; for(int i = 1 ; i <= N ; ++i) { int cnt0 = 0 , cnt1 = 0 ; for(int j = 1 ; j <= N ; ++j) { bool flag0 = (j != i) , flag1 = (j != i) ; for(int k = 1 ; k <= N ; ++k) { if(i == j || i == k || j == k) continue ; flag0 &= (!mark[i][j][k]) ; flag1 &= (mark[i][j][k]) ; } cnt0 += flag0 , cnt1 += flag1 ; } ans += (cnt1 > 0) ; } give_answer(ans) ; }
#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...