Submission #364200

#TimeUsernameProblemLanguageResultExecution timeMemory
364200Ahmadsm2005Costinland (info1cup19_costinland)C++14
20 / 100
1083 ms204 KiB
#include <bits/stdc++.h> //#define endl '\n' #define modulo 1000000007 #define int long long #define PI acos(-1) #pragma GCC optimize("-Ofast") //#pragma GCC optimize("trapv") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx2,tune=native") #pragma GCC optimize("-ffast-math") #pragma GCC optimize("-funroll-loops") #pragma GCC optimize("-funroll-all-loops,-fpeel-loops,-funswitch-loops") #define sinDegrees(x) sin((x) * PI / 180.0) #define cosDegrees(x) cos((x) * PI / 180.0) #define tanDegrees(x) tan((x) * PI / 180.0) #define atanDegrees(x) atan(x)* 180.0 / PI #define asinDegrees(x) asin(x)* 180.0 / PI #define EPS 0.000000001 using namespace std; int power(int x,int y,int m) { int temp; if(y == 0) return 1; temp = (power(x, y/2,m))%m; if (y%2 == 0) return ((temp%m)*temp); else return ((x*temp%m)*temp%m)%m; } int inv(int x,int m=modulo) { return (power(x,m-2,m))%m; } ///IOI 2021 isA int X,Y; vector<vector<char>>FOUND; void BEST(vector<vector<char>>lolz,vector<vector<int>>lolz2,int x,int y){ if(x<0) x=3,y--; if(y<0){ if(lolz2[0][0]==X&&!FOUND.size()){ for(int i=0;i<4;i++){ for(int l=0;l<4;l++) cout<<lolz[i][l]; cout<<'d'<<endl; } for(int i=0;i<4;i++) cout<<'r'; cout<<'.'; exit(0); } return; } lolz[x][y]='d'; lolz2[x][y]=lolz2[x+1][y]; BEST(lolz,lolz2,x-1,y); lolz[x][y]='r'; lolz2[x][y]=lolz2[x][y+1]; BEST(lolz,lolz2,x-1,y); lolz[x][y]='X'; lolz2[x][y]=lolz2[x+1][y]+lolz2[x][y+1]; BEST(lolz,lolz2,x-1,y); } int32_t main() { //freopen("output.txt","w",stdout); //freopen("sorting.in","r",stdin); cin.tie(0),iostream::sync_with_stdio(0); cin>>X; vector<vector<char>>lolz(4); vector<vector<int>>lolz2(5); for(int i=0;i<4;i++){ for(int l=0;l<4;l++){ lolz[i].push_back('.'); } } for(int i=0;i<5;i++){ for(int l=0;l<5;l++) lolz2[i].push_back(1); } cout<<5<<' '<<5<<endl; //CALC(0,0); BEST(lolz,lolz2,3,3); return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...