結果
| 問題 |
No.201 yukicoderじゃんけん
|
| コンテスト | |
| ユーザー |
Kmcode1
|
| 提出日時 | 2015-05-03 23:25:29 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 5,000 ms |
| コード長 | 1,044 bytes |
| コンパイル時間 | 1,079 ms |
| コンパイル使用メモリ | 106,288 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-05 16:28:59 |
| 合計ジャッジ時間 | 1,796 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include<iostream>
#include<cstdio>
#include<cstring>
#include<string>
#include<cctype>
#include<cstdlib>
#include<algorithm>
#include<bitset>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<map>
#include<set>
#include<stack>
#include<cmath>
#include<sstream>
#include<fstream>
#include<iomanip>
#include<ctime>
#include<complex>
#include<functional>
#include<climits>
#include<cassert>
#include<iterator>
using namespace std;
vector<pair<string,string> > v;
bool cmp(pair<string, string> a, pair<string, string> b){
if (a.first == b.first){
puts("-1");
exit(0);
}
if (a.first.size() != b.first.size()){
if (a.first.size() > b.first.size()){
cout << a.second << endl;
}
else{
cout<<b.second << endl;
}
exit(0);
}
if (a.first < b.first){
cout << b.second << endl;
}
else{
cout << a.second << endl;
}
exit(0);
}
int main(){
for (int i = 0; i < 2; i++){
string a;
string b;
char c;
cin >> a >> b >> c;
v.push_back(make_pair(b, a));
}
sort(v.begin(), v.end(),cmp);
return 0;
}
Kmcode1