This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |