| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 484571 | asandikci | 고장난 휴대전화기 (COCI14_mobitel) | C++17 | 1 ms | 204 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
//Copyright © 2021 Aliberk Sandıkçı. All rights reserved.
#include "bits/stdc++.h"
#define pb push_back
#define lwb lower_bound
#define upb upper_bound
#define fori(a,b) for(int i=a;i<=b;i++)
#define forj(a,b) for(int j=a;j<=b;j++)
#define fi first
#define se second
#define debu cout << "*debug*\n"
#define debug(x) cout << "debug " << x <<"\n"
#define int long long
constexpr int modn = 1e9+7; // 998244353
constexpr int maxn = 1e6+5;
constexpr int INF = 1e9+5;
using namespace std;
string keyb[] = {"!!!!","----","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"};
void solve(){
string broken[15];
int tmp;
fori(1,9){
cin >> tmp;
broken[i]=keyb[tmp];
}
string str;
cin >> str;
int pre=-1;
for(auto let : str){
fori(1,9){
int num=0;
for(auto it : broken[i]){
num++;
if(it==let){
if(pre==i){
cout << "#";
}
forj(1,num){
cout << i << "";
}
pre=i;
}
}
}
}
}
signed main(){
ios::sync_with_stdio(0);cin.tie(0);
//freopen("","r",stdin);
//freopen("","w",stdout);
int T=1;
//cin >> T;
while(T--){
solve();
}
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
