# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
331477 | 2020-11-28T16:12:04 Z | Nayna | Paint By Numbers (IOI16_paint) | C++14 | 1 ms | 492 KB |
#include <bits/stdc++.h> #include "paint.h" #include <cstdlib> using namespace std; string solve_puzzle(string s, vector<int> c) { string ans; int k = c.size(); int n = s.size(); int cur = 0; for(int i = 0; i < n; i++) { if(s[i]!='.') continue; int cnt = 0, r = i; while(r < n && cnt<c[cur]) { if(s[r]=='_') break; cnt++; r++; } if(cnt==c[cur]) { for(int r = i; r < i+c[cur]; r++) s[r] = 'X'; s[i+c[cur]] = '_'; cur++; } } for(int i = 0; i < n; i++) { if(s[i]=='.') s[i] = '_'; } return s; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 492 KB | char #0 differ - expected: '?', found: 'X' |
2 | Halted | 0 ms | 0 KB | - |