Submission #432762
Source Code Expand
#include <cstdio> #include <iostream> #include <cstring> #include <algorithm> #include <vector> #include <map> #include <queue> #include <set> #include <tuple> #include <cassert> #include <numeric> #include <random> #include <math.h> #include <iomanip> using namespace std; typedef long long ll; typedef unsigned long long ull; int main(){ int n,k[5],i,j,z,kaunto=1; char str[6],c,d; cin>>str; cin>>n; for(i=0;i<5;i++)k[i]=str[i]-'a'+1; for(i=0;i<4;i++){ for(j=i+1;i<5;j++){ if(k[i]>k[j]){ z=k[i]; k[i]=k[j]; k[j]=z; c=str[i]; str[i]=str[j]; str[j]=c; } } } for(i=0;i<5;i++){ for(j=0;j<5;j++){ c=str[i]; d=str[j]; if(kaunto==n)goto loop; kaunto++; } } loop: cout<<c<<d<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | A - 25個の文字列 |
User | goading |
Language | C++11 (GCC 4.9.2) |
Score | 0 |
Code Size | 805 Byte |
Status | TLE |
Exec Time | 2046 ms |
Memory | 932 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample-01.txt, sample-02.txt, sample-03.txt |
All | test-01.txt, test-02.txt, test-03.txt, test-04.txt, test-05.txt, test-06.txt, test-07.txt, test-08.txt, test-09.txt, test-10.txt, test-11.txt, test-12.txt, test-13.txt, test-14.txt, test-15.txt, test-16.txt, test-17.txt, test-18.txt, test-19.txt, test-20.txt, test-21.txt, test-22.txt, test-23.txt, test-24.txt, test-25.txt, test-26.txt, test-27.txt, test-28.txt, test-29.txt, test-30.txt, sample-01.txt, sample-02.txt, sample-03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
sample-01.txt | TLE | 2033 ms | 860 KB |
sample-02.txt | TLE | 2032 ms | 796 KB |
sample-03.txt | TLE | 2033 ms | 864 KB |
test-01.txt | TLE | 2046 ms | 804 KB |
test-02.txt | TLE | 2031 ms | 804 KB |
test-03.txt | TLE | 2033 ms | 932 KB |
test-04.txt | TLE | 2031 ms | 800 KB |
test-05.txt | TLE | 2033 ms | 880 KB |
test-06.txt | TLE | 2033 ms | 796 KB |
test-07.txt | TLE | 2031 ms | 804 KB |
test-08.txt | TLE | 2035 ms | 928 KB |
test-09.txt | TLE | 2033 ms | 924 KB |
test-10.txt | TLE | 2032 ms | 804 KB |
test-11.txt | TLE | 2032 ms | 808 KB |
test-12.txt | TLE | 2034 ms | 924 KB |
test-13.txt | TLE | 2032 ms | 804 KB |
test-14.txt | TLE | 2039 ms | 920 KB |
test-15.txt | TLE | 2034 ms | 800 KB |
test-16.txt | TLE | 2032 ms | 808 KB |
test-17.txt | TLE | 2033 ms | 860 KB |
test-18.txt | TLE | 2033 ms | 804 KB |
test-19.txt | TLE | 2033 ms | 804 KB |
test-20.txt | TLE | 2034 ms | 920 KB |
test-21.txt | TLE | 2033 ms | 928 KB |
test-22.txt | TLE | 2033 ms | 800 KB |
test-23.txt | TLE | 2034 ms | 804 KB |
test-24.txt | TLE | 2034 ms | 804 KB |
test-25.txt | TLE | 2031 ms | 800 KB |
test-26.txt | TLE | 2034 ms | 924 KB |
test-27.txt | TLE | 2032 ms | 804 KB |
test-28.txt | TLE | 2033 ms | 860 KB |
test-29.txt | TLE | 2033 ms | 796 KB |
test-30.txt | TLE | 2033 ms | 804 KB |