# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
299775 | theshadow_04 | Mobitel (COCI14_mobitel) | C++14 | 1 ms | 384 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// VU TRUONG AN
#include <bits/stdc++.h>
#define F first
#define S second
#define MOD 1000000007
#define pb push_back
#define bit(x,p) ((x>>p) & 1)
#define ll long long
#define Task "MOBITEL"
using namespace std;
const int base = 100003;
const int maxn = 100005;
string s[9] = {"000","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
map<char,int> M,sl;
int main(){
ios_base::sync_with_stdio(0);
cout.tie(0); cin.tie(0);
if(fopen(Task".inp","r")){
freopen(Task".inp","r",stdin);
freopen(Task".out","w",stdout);
}
for(int i = 1;i <= 9;++i){
int a;
cin >> a;
if(i > 1){
for(int j = 0;j < s[i - 1].length();++j){
char c = s[i - 1][j];
M[c] = a;
sl[c] = j + 1;
}
}
}
string res;
cin >> res;
for(int i = 0;i < res.length();++i){
if(M[res[i]] == M[res[i - 1]]) cout << '#';
for(int j = 1;j <= sl[res[i]];++j) cout << M[res[i]];
}
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |