Submission #172788

#TimeUsernameProblemLanguageResultExecution timeMemory
172788mohammadCave (IOI13_cave)C++14
34 / 100
64 ms628 KiB
/* ░░░░██████████████████ ░░▄███████▀▀▀▀▀▀███████▄ ░▐████▀▒mohammad▒▀██████▄ ░███▀▒▒▒▒alaa▒▒▒▒▒▒▀█████ ░▐██▒▒▒alwrawrah▒▒▒▒▒████▌ ░▐█▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████▌ ░░█▒▄▀▀▀▀▀▄▒▒▄▀▀▀▀▀▄▒▐███▌ ░░░▐░░░▄▄░░▌▐░░░▄▄░░▌▐███▌ ░▄▀▌░░░▀▀░░▌▐░░░▀▀░░▌▒▀▒█▌ ░▌▒▀▄░░░░▄▀▒▒▀▄░░░▄▀▒▒▄▀▒▌ ░▀▄▐▒▀▀▀▀▒▒▒▒▒▒▀▀▀▒▒▒▒▒▒█ ░░░▀▌▒▄██▄▄▄▄████▄▒▒▒▒█▀ ░░░░▄██████████████▒▒▐▌ ░░░▀███▀▀████▀█████▀▒▌ ░░░░░▌▒▒▒▄▒▒▒▄▒▒▒▒▒▒▐ ░░░░░▌▒▒▒▒▀▀▀▒▒▒▒▒▒▒▐ */ #include<bits/stdc++.h> #include "cave.h" using namespace std; typedef long long ll ; const ll oo = 4294967296; const double PI = acos(-1); const ll M = 998244353; int s[5010] , d[5010]; void exploreCave(int N){ for(int i = 0 ; i < N ; ++i) d[i] = -1 ; int x = tryCombination(s) , idx = 0; while(x != -1){ for(int i = 0 ; i < N ; ++i){ if(s[i] == 1) continue; s[i] = 1; int nx = tryCombination(s); if(x >= nx && nx != -1) s[i] = 0; else{ x = nx ; break; } } } for(int i = 0 ; i < N ; ++i){ s[i] = !s[i]; int x = tryCombination(s); d[i] = x; s[i] = !s[i]; } answer(s , d); }

Compilation message (stderr)

cave.cpp: In function 'void exploreCave(int)':
cave.cpp:33:30: warning: unused variable 'idx' [-Wunused-variable]
  int x = tryCombination(s) , idx = 0;
                              ^~~
#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...