Submission #428435

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4284352021-06-15 11:47:58Rouge_HugoGame (IOI14_game)C++14
42 / 100
112 ms1064 KiB
#include<bits/stdc++.h>
#include "game.h"
#define ll long long
#define fi first
#define se second
#define pb push_back
using namespace std;
int n;
const int N=100;
int vis[N],yes[N][N];
void dfs(int x)
{
if(vis[x])return;
vis[x]=1;
for(int it=0;it<n;it++)
{
int z=it,zz=x;
if(z>zz)swap(z,zz);
if(yes[z][zz]!=-1)continue;
if(vis[it])continue;
dfs(it);
}
}
void initialize(int N) {
n=N;
memset(yes,-1,sizeof yes);
}
int hasEdge(int x, int y) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

game.cpp: In function 'int hasEdge(int, int)':
game.cpp:31:4: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   31 |    if(x>y)swap(x,y);memset(vis,0,sizeof vis);
      |    ^~
game.cpp:31:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   31 |    if(x>y)swap(x,y);memset(vis,0,sizeof vis);
      |                     ^~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...