結果
| 問題 |
No.360 増加門松列
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-01-31 21:09:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 751 bytes |
| コンパイル時間 | 1,887 ms |
| コンパイル使用メモリ | 162,976 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2025-01-31 21:09:52 |
| 合計ジャッジ時間 | 3,346 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
ソースコード
#include <bits/stdc++.h>
#define int long long
//#define USE_FREOPEN
//#define MUL_TEST
#define FILENAME "digit"
using namespace std;
int a[8];
void solve()
{
for (int i = 1; i <= 7; i++)
cin >> a[i];
sort(a + 1,a + 8);
do
{
for (int i = 1; i <= 5; i++)
{
if (a[i] < a[i + 2] && (a[i] != a[i + 1] && a[i] != a[i + 2]))
{
if (a[i] > a[i + 1] || a[i + 1] > a[i + 2])
if (i == 5)
{
puts("YES");
return;
}
}
else
break;
}
}while(next_permutation(a + 1,a + 8));
puts("NO");
}
signed main()
{
#ifdef USE_FREOPEN
freopen(FILENAME ".in","r",stdin);
freopen(FILENAME ".out","w",stdout);
#endif
int _ = 1;
#ifdef MUL_TEST
cin >> _;
#endif
while (_--)
solve();
_^=_;
return 0^_^0;
}
vjudge1