結果
| 問題 |
No.360 増加門松列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-11-25 18:55:22 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 621 bytes |
| コンパイル時間 | 1,477 ms |
| コンパイル使用メモリ | 172,584 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-27 11:20:20 |
| 合計ジャッジ時間 | 2,150 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 9 WA * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
const string msg[] = { "NO", "YES" };
int kado( int x, int y, int z ){
if( x == y or y == z or z == x )
return 0;
if( not ( min( { x, y, z } ) == y or max( { x, y, z } ) == y ) )
return 0;
return x < z;
}
signed main(){
vector< int > D( 7 );
for( int i = 0; i < 7; ++i )
cin >> D[ i ];
sort( D.begin(), D.end() );
do{
for( int i = 0; i + 3 <= 7; ++i )
if( kado( D[ i ], D[ i + 1 ], D[ i + 2 ] ) )
cout << msg[ 1 ] << endl, exit( 0 );
} while( next_permutation( D.begin(), D.end() ) );
cout << msg[ 0 ] << endl;
return 0;
}