Submission #8007346
Source Code Expand
// #pragma GCC target("avx2") // CPU 処理並列化 // #pragma GCC optimize("O3") // CPU 処理並列化 // #pragma GCC optimize("unroll-loops") // 条件処理の呼び出しを減らす #include<stdio.h> #include<math.h> #include<algorithm> #include<queue> #include<deque> #include<stack> #include<string> #include<string.h> #include<vector> #include<set> #include<map> #include<bitset> #include<stdlib.h> #include<cassert> #include<time.h> #include<bitset> #include<numeric> #include<unordered_set> #include<complex> using namespace std; const long long mod=1000000007; const long long inf=mod*mod; const long long d2=(mod+1)/2; const double EPS=1e-10; const double INF=1e+10; const double PI=acos(-1.0); const int C_SIZE = 3121000; namespace{ long long fact[C_SIZE]; long long finv[C_SIZE]; long long inv[C_SIZE]; long long Comb(int a,int b){ if(a<b||b<0)return 0; return fact[a]*finv[b]%mod*finv[a-b]%mod; } void init_C(int n){ fact[0]=finv[0]=inv[1]=1; for(int i=2;i<n;i++){ inv[i]=(mod-(mod/i)*inv[mod%i]%mod)%mod; } for(int i=1;i<n;i++){ fact[i]=fact[i-1]*i%mod; finv[i]=finv[i-1]*inv[i]%mod; } } long long pw(long long a,long long b){ if(a<0LL)return 0; if(b<0LL)return 0; long long ret=1; while(b){ if(b%2)ret=ret*a%mod; a=a*a%mod; b/=2; } return ret; } long long pw_mod(long long a,long long b,long long M){ if(a<0LL)return 0; if(b<0LL)return 0; long long ret=1; while(b){ if(b%2)ret=ret*a%M; a=a*a%M; b/=2; } return ret; } int pw_mod_int(int a,int b,int M){ if(a<0)return 0; if(b<0)return 0; int ret=1; while(b){ if(b%2)ret=(long long)ret*a%M; a=(long long)a*a%M; b/=2; } return ret; } int ABS(int a){return max(a,-a);} long long ABS(long long a){return max(a,-a);} double ABS(double a){return max(a,-a);} int sig(double r) { return (r < -EPS) ? -1 : (r > +EPS) ? +1 : 0; } } // ここから編集しろ char in[70]; int v[10]; char ans[10]; int main(){ scanf("%s",in); int n=strlen(in); int at=7; for(int i=n-1;i>=0;i--){ if(v[in[i]-'A']==0){ v[in[i]-'A']=1; ans[at--]=in[i]; } } for(int i=0;i<8;i++){ if(!v[i]){ ans[at--]=i+'A'; } } printf("%s\n",ans); }
Submission Info
Submission Time | |
---|---|
Task | B - 残像に口紅を |
User | tozangezan |
Language | C++14 (GCC 5.4.1) |
Score | 100 |
Code Size | 2312 Byte |
Status | AC |
Exec Time | 3 ms |
Memory | 256 KB |
Compile Error
./Main.cpp: In function ‘int main()’: ./Main.cpp:93:16: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result] scanf("%s",in); ^
Judge Result
Set Name | Easy | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 50 / 50 | 50 / 50 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Easy | easy-000.txt, easy-001.txt, easy-002.txt, easy-003.txt, easy-004.txt, easy-005.txt, easy-006.txt, easy-007.txt, easy-008.txt, easy-009.txt, easy-010.txt, easy-011.txt, easy-012.txt, easy-013.txt, easy-014.txt |
All | easy-000.txt, easy-001.txt, easy-002.txt, easy-003.txt, easy-004.txt, easy-005.txt, easy-006.txt, easy-007.txt, easy-008.txt, easy-009.txt, easy-010.txt, easy-011.txt, easy-012.txt, easy-013.txt, easy-014.txt, hard-000.txt, hard-001.txt, hard-002.txt, hard-003.txt, hard-004.txt, hard-005.txt, hard-006.txt, hard-007.txt, hard-008.txt, hard-009.txt, hard-010.txt, hard-011.txt, hard-012.txt, hard-013.txt, hard-014.txt, hard-015.txt, hard-016.txt, hard-017.txt, hard-018.txt, hard-019.txt, hard-020.txt, hard-021.txt, hard-022.txt, hard-023.txt, hard-024.txt, hard-025.txt, hard-026.txt, sample1.txt, sample2.txt, sample3.txt, sample4.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
easy-000.txt | AC | 3 ms | 256 KB |
easy-001.txt | AC | 0 ms | 128 KB |
easy-002.txt | AC | 0 ms | 128 KB |
easy-003.txt | AC | 0 ms | 128 KB |
easy-004.txt | AC | 0 ms | 128 KB |
easy-005.txt | AC | 0 ms | 128 KB |
easy-006.txt | AC | 0 ms | 128 KB |
easy-007.txt | AC | 0 ms | 128 KB |
easy-008.txt | AC | 0 ms | 128 KB |
easy-009.txt | AC | 0 ms | 128 KB |
easy-010.txt | AC | 0 ms | 128 KB |
easy-011.txt | AC | 0 ms | 128 KB |
easy-012.txt | AC | 0 ms | 128 KB |
easy-013.txt | AC | 0 ms | 128 KB |
easy-014.txt | AC | 0 ms | 128 KB |
hard-000.txt | AC | 0 ms | 128 KB |
hard-001.txt | AC | 0 ms | 128 KB |
hard-002.txt | AC | 0 ms | 128 KB |
hard-003.txt | AC | 0 ms | 128 KB |
hard-004.txt | AC | 0 ms | 128 KB |
hard-005.txt | AC | 0 ms | 128 KB |
hard-006.txt | AC | 0 ms | 128 KB |
hard-007.txt | AC | 0 ms | 128 KB |
hard-008.txt | AC | 0 ms | 128 KB |
hard-009.txt | AC | 0 ms | 128 KB |
hard-010.txt | AC | 0 ms | 128 KB |
hard-011.txt | AC | 0 ms | 128 KB |
hard-012.txt | AC | 0 ms | 128 KB |
hard-013.txt | AC | 0 ms | 128 KB |
hard-014.txt | AC | 0 ms | 128 KB |
hard-015.txt | AC | 0 ms | 128 KB |
hard-016.txt | AC | 0 ms | 128 KB |
hard-017.txt | AC | 0 ms | 128 KB |
hard-018.txt | AC | 0 ms | 128 KB |
hard-019.txt | AC | 0 ms | 128 KB |
hard-020.txt | AC | 0 ms | 128 KB |
hard-021.txt | AC | 0 ms | 128 KB |
hard-022.txt | AC | 0 ms | 128 KB |
hard-023.txt | AC | 0 ms | 128 KB |
hard-024.txt | AC | 0 ms | 128 KB |
hard-025.txt | AC | 0 ms | 128 KB |
hard-026.txt | AC | 0 ms | 128 KB |
sample1.txt | AC | 0 ms | 128 KB |
sample2.txt | AC | 0 ms | 128 KB |
sample3.txt | AC | 0 ms | 128 KB |
sample4.txt | AC | 0 ms | 128 KB |