제출 #1065669

#제출 시각아이디문제언어결과실행 시간메모리
1065669sunboiPaint By Numbers (IOI16_paint)C++17
7 / 100
1 ms348 KiB
#include <bits/stdc++.h> #include "paint.h" using namespace std; string solve_puzzle(string s, vector<int> c){ int n = s.size(); int k = c.size(); int r = min(c[0] - 1, n - 1); int l = max(0, n - 1 - (c[0] - 1)); for (int i = 0; i< n; i++){ if (i >= l && i <= r){ s[i] = 'X'; }else s[i] = '?'; } return s; }

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

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