結果
問題 |
No.998 Four Integers
|
ユーザー |
![]() |
提出日時 | 2020-07-24 16:21:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 528 bytes |
コンパイル時間 | 509 ms |
コンパイル使用メモリ | 65,812 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-25 12:33:22 |
合計ジャッジ時間 | 1,410 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 23 |
ソースコード
#include <iostream> void aaa(int *a,int start,int end){ if(start<end){ for(int i=start;i<end; i++){ if(a[i]>a[i+1]){ int tmp=a[i]; a[i]=a[i+1]; a[i+1]=tmp; } } aaa(a,start,end-1); } } int main(void){ int x[5]; x[0]=0; x[1]=0; x[2]=0; x[3]=0; x[4]=0; std::cin >> x[0] >> x[1] >> x[2] >> x[3]; aaa(x,0,3); //std::cout << x[0] << x[1] << x[2] << x[3]; if((x[3]-x[0]==3)&&(x[2]-x[1]==1)) std::cout << "Yes" << std::endl; else std::cout << "No" <<std::endl; }