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<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++)
{
bool ok = true, ok2 = false;
for(int c = 1; c <= n; c++)
{
ok2 = true;
if(a != b && a != c && b != c) ok = ok && is_clockwise(a, b, c);
}
ans += (ok && ok2);
}
}
give_answer(ans / 2);
}
# | 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... |