結果
問題 | No.571 3人兄弟(その2) |
ユーザー |
|
提出日時 | 2017-11-18 13:11:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 299 bytes |
コンパイル時間 | 1,452 ms |
コンパイル使用メモリ | 173,264 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-25 11:30:48 |
合計ジャッジ時間 | 2,110 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 12 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:10:25: warning: narrowing conversion of '(65 + i)' from 'int' to 'char' [-Wnarrowing] 10 | A[i]={{-a,b},'A'+i}; | ~~~^~
ソースコード
#include<bits/stdc++.h>#define rep(i,a,n) for (int i = a;i < n;i++)using namespace std;pair<pair<int,int>,char> A[3];int main(){rep(i,0,3) {int a,b;cin>>a>>b;A[i]={{-a,b},'A'+i};}sort(A,A+3);rep(i,0,3){cout << A[i].second << endl;}}