| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 328810 | Halit | 고장난 휴대전화기 (COCI14_mobitel) | C++17 | 1 ms | 384 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
int main(){
	vector<int> v(9);
	for(int &e : v)
		cin >> e;
	vector<int> pre = { 0, 3, 6, 9, 12, 15, 19, 22, 26};
	int last = 1;
	string s;
	cin >> s;
	auto to_int = [&](char ch){ return ch-'a'+1; };
	auto write = [&](int cur){
		
		int digit = 2, F;
		for(int i = 0;i+1 < 9;++i)
			if(cur > pre[i] && cur <= pre[i+1])
				digit += i, F = cur-pre[i];
		if(last == digit)
			cout << '#';
		for(int j = 0;j < 9;++j)
			if(v[j] == digit)
				for(int i = 0;i < F;++i)
					cout << j+1;
		last = digit;
	};
	for(char e : s)
		write(to_int(e));
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
