Submission #717750

#TimeUsernameProblemLanguageResultExecution timeMemory
717750nihaddhuseynliPaint By Numbers (IOI16_paint)C++14
7 / 100
1 ms308 KiB
#include "paint.h" #include <bits/stdc++.h> #include <cstdlib> typedef long long int ll; using namespace std; string solve_puzzle(std::string s, std::vector<int> c) { string str=""; ll n=s.length(); string a[n+1]; ll cnt=0; str=s; ll flag=0; for(int i =0;i<n;i++) { str=s; if(c[0]+i<=n) { for(int j =i;j<c[0]+i;j++) { str[j]='X'; } a[cnt]=str; cnt++; } } str=s; for(int i =0;i<n;i++) { for(int j =0;j<cnt-1;j++) { if(a[j][i]!=a[j+1][i]) { flag=1; } } if(flag==0) { str[i]='X'; } else { str[i]='?'; } flag=0; } return str; }
#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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...