제출 #1035897

#제출 시각아이디문제언어결과실행 시간메모리
1035897baldwinhuang1Paint By Numbers (IOI16_paint)C++14
0 / 100
0 ms348 KiB
#include "paint.h" #include <cstdlib> #include <bits/stdc++.h> using namespace std; string solve_puzzle(string s, vector<int> c) { string a = s; string b = s; for (int i = 0; i < c[0]; i++) { a[i] = 'X'; } for (int i = s.size() - 1; i > (s.size() - c[0] - 1); i--) { b[i] = 'X'; } for (auto &i: s) { i = '?'; } for (int i = 0; i < s.size(); i++) { if (a[i] == 'X' && b[i] == 'X') { s[i] = 'X'; } } // cout << a << '\n' << b << '\n'; // cout << s << '\n'; return s; }

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

paint.cpp: In function 'std::string solve_puzzle(std::string, std::vector<int>)':
paint.cpp:17:34: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   17 |     for (int i = s.size() - 1; i > (s.size() - c[0] - 1); i--) {
      |                                ~~^~~~~~~~~~~~~~~~~~~~~~~
paint.cpp:25:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::__cxx11::basic_string<char>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   25 |     for (int i = 0; i < s.size(); i++) {
      |                     ~~^~~~~~~~~~
#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...