Submission #427018

#TimeUsernameProblemLanguageResultExecution timeMemory
427018vincentpikachu20Paint By Numbers (IOI16_paint)C++17
7 / 100
1 ms204 KiB
#include "paint.h" #include <bits/stdc++.h> #define int long long using namespace std; string solve_puzzle(string s, vector<signed> c) { int n = s.size(), k = c.size(); string ans = ""; if(n >= 2*c[0]) for(int i = 0; i < n; i ++) ans += '?'; else{ for(int i = 0; i < n-c[0]; i ++) ans += '?'; for(int i = 0; i < 2*c[0]-n; i ++) ans += 'X'; for(int i = 0; i < n-c[0]; i ++) ans += '?'; } return ans; }

Compilation message (stderr)

paint.cpp: In function 'std::string solve_puzzle(std::string, std::vector<int>)':
paint.cpp:7:23: warning: unused variable 'k' [-Wunused-variable]
    7 |     int n = s.size(), k = c.size();
      |                       ^
#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...