結果
| 問題 |
No.570 3人兄弟(その1)
|
| コンテスト | |
| ユーザー |
ianlinathome
|
| 提出日時 | 2017-11-10 05:17:41 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 330 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 35,272 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-24 10:37:58 |
| 合計ジャッジ時間 | 598 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:7:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
7 | for(int i=0;i<3;i++)scanf("%d",&a[i]);
| ~~~~~^~~~~~~~~~~~
ソースコード
#include <stdio.h>
#include <algorithm>
using namespace std;
int main(){
int a[3],c[3]={0,1,2};
char b[3]={'A','B','C'};
for(int i=0;i<3;i++)scanf("%d",&a[i]);
for(int i=0;i<6;i++){
if(a[c[0]]>a[c[1]]&&a[c[1]]>a[c[2]])printf("%c\n%c\n%c\n",b[c[0]],b[c[1]],b[c[2]]);
next_permutation(c,c+3);
}
}
ianlinathome