제출 #600527

#제출 시각아이디문제언어결과실행 시간메모리
600527ChickTheNuggetPaint By Numbers (IOI16_paint)C++17
7 / 100
1 ms212 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define INF 1e9 #define MOD 1e9 + 7 #define MAXN 1000 string solve_puzzle(string s, vector<int> c) { int n = s.size(); int k = c.size(); string ans = ""; if (c[0] > (n / 2)){ for (int i = 0; i < n - c[0]; i++){ ans += "?"; } for (int i = 0; i < abs(n - 2 * c[0]); i++){ ans += "X"; } for (int i = 0; i < n - c[0]; i++){ ans += "?"; } } else{ for (int i = 0; i < n; i++){ ans += "?"; } } return ans; } // int main() // { // ios_base::sync_with_stdio(0); // cin.tie(0); cout.tie(0); // #ifndef ONLINE_JUDGE // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); // #endif // cout << solve_puzzle("........", {6}); // }

컴파일 시 표준 에러 (stderr) 메시지

paint.cpp: In function 'std::string solve_puzzle(std::string, std::vector<int>)':
paint.cpp:13:9: warning: unused variable 'k' [-Wunused-variable]
   13 |     int 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...