Submission #20589
Source Code Expand
#include<string> #include<iostream> #define rep(i,n) for(int i=0;i<(n);i++) using namespace std; int main(){ int n; cin>>n; string s[50]; rep(i,n) cin>>s[i]; string ans=s[0]+s[1]; rep(i,n) rep(j,n) if(i!=j) ans=min(ans,s[i]+s[j]); cout<<ans<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | B - パスワード |
User | fura2 |
Language | C++ (G++ 4.6.4) |
Score | 100 |
Code Size | 290 Byte |
Status | AC |
Exec Time | 26 ms |
Memory | 868 KB |
Judge Result
Set Name | All | ||
---|---|---|---|
Score / Max Score | 100 / 100 | ||
Status |
|
Set Name | Test Cases |
---|---|
All | input_0.txt, input_1.txt, input_10.txt, input_11.txt, input_12.txt, input_13.txt, input_14.txt, input_15.txt, input_16.txt, input_17.txt, input_18.txt, input_19.txt, input_2.txt, input_20.txt, input_21.txt, input_22.txt, input_23.txt, input_3.txt, input_4.txt, input_5.txt, input_6.txt, input_7.txt, input_8.txt, input_9.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
input_0.txt | AC | 22 ms | 776 KB |
input_1.txt | AC | 20 ms | 780 KB |
input_10.txt | AC | 26 ms | 808 KB |
input_11.txt | AC | 23 ms | 784 KB |
input_12.txt | AC | 22 ms | 768 KB |
input_13.txt | AC | 21 ms | 780 KB |
input_14.txt | AC | 24 ms | 736 KB |
input_15.txt | AC | 23 ms | 784 KB |
input_16.txt | AC | 21 ms | 780 KB |
input_17.txt | AC | 20 ms | 780 KB |
input_18.txt | AC | 20 ms | 776 KB |
input_19.txt | AC | 20 ms | 768 KB |
input_2.txt | AC | 22 ms | 784 KB |
input_20.txt | AC | 23 ms | 788 KB |
input_21.txt | AC | 22 ms | 780 KB |
input_22.txt | AC | 22 ms | 784 KB |
input_23.txt | AC | 19 ms | 732 KB |
input_3.txt | AC | 21 ms | 780 KB |
input_4.txt | AC | 21 ms | 784 KB |
input_5.txt | AC | 22 ms | 776 KB |
input_6.txt | AC | 22 ms | 868 KB |
input_7.txt | AC | 20 ms | 772 KB |
input_8.txt | AC | 22 ms | 784 KB |
input_9.txt | AC | 20 ms | 780 KB |