Submission #891136
Source Code Expand
#include <string> #include <vector> #include<iostream> #include<cstdio> #include<cstdlib> #include<stack> #include<queue> #include<cmath> #include<algorithm> #include<functional> #include<list> #include<deque> #include<bitset> #include<set> #include<map> #include<unordered_map> #include<cstring> #include<sstream> #include<complex> #include<iomanip> #include<numeric> #include<cassert> #define X first #define Y second #define pb push_back #define rep(X,Y) for (int (X) = 0;(X) < (Y);++(X)) #define reps(X,S,Y) for (int (X) = S;(X) < (Y);++(X)) #define rrep(X,Y) for (int (X) = (Y)-1;(X) >=0;--(X)) #define repe(X,Y) for ((X) = 0;(X) < (Y);++(X)) #define peat(X,Y) for (;(X) < (Y);++(X)) #define all(X) (X).begin(),(X).end() #define rall(X) (X).rbegin(),(X).rend() #define eb emplace_back #define UNIQUE(X) (X).erase(unique(all(X)),(X).end()) using namespace std; typedef long long ll; typedef pair<int,int> pii; typedef pair<ll,ll> pll; template<class T> using vv=vector<vector<T>>; template<class T> ostream& operator<<(ostream &os, const vector<T> &t) { os<<"{"; rep(i,t.size()) {os<<t[i]<<",";} os<<"}"<<endl; return os;} template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";} template<class T> inline bool MX(T &l,const T &r){return l<r?l=r,1:0;} template<class T> inline bool MN(T &l,const T &r){return l>r?l=r,1:0;} const ll MOD=1e9+7; int main(){ ios_base::sync_with_stdio(false); cout<<fixed<<setprecision(0); string s; int t; cin>>s>>t; int n=s.size(); for(char &c:s){ if('z'+1-c<t) continue; t-='z'+1-c; c='a'; } cout<<s<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | C - Next Letter |
User | nuip |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1721 Byte |
Status | WA |
Exec Time | 3 ms |
Memory | 592 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt, 1_15.txt, 1_16.txt, 1_17.txt, 1_18.txt, 1_19.txt, 1_20.txt, 1_21.txt, 1_22.txt, 1_23.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | WA | 3 ms | 256 KB |
0_01.txt | WA | 3 ms | 256 KB |
0_02.txt | WA | 3 ms | 256 KB |
1_00.txt | WA | 3 ms | 256 KB |
1_01.txt | AC | 3 ms | 256 KB |
1_02.txt | AC | 3 ms | 256 KB |
1_03.txt | AC | 3 ms | 256 KB |
1_04.txt | WA | 2 ms | 256 KB |
1_05.txt | WA | 3 ms | 256 KB |
1_06.txt | WA | 3 ms | 592 KB |
1_07.txt | WA | 3 ms | 592 KB |
1_08.txt | WA | 3 ms | 512 KB |
1_09.txt | WA | 3 ms | 512 KB |
1_10.txt | WA | 3 ms | 592 KB |
1_11.txt | WA | 3 ms | 512 KB |
1_12.txt | WA | 3 ms | 512 KB |
1_13.txt | WA | 3 ms | 512 KB |
1_14.txt | WA | 3 ms | 512 KB |
1_15.txt | WA | 3 ms | 512 KB |
1_16.txt | WA | 3 ms | 512 KB |
1_17.txt | WA | 3 ms | 512 KB |
1_18.txt | WA | 3 ms | 512 KB |
1_19.txt | WA | 3 ms | 592 KB |
1_20.txt | WA | 3 ms | 512 KB |
1_21.txt | WA | 3 ms | 592 KB |
1_22.txt | WA | 3 ms | 512 KB |
1_23.txt | WA | 3 ms | 512 KB |