結果
| 問題 | No.696 square1001 and Permutation 5 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-06-08 22:59:08 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 408 bytes |
| 記録 | |
| コンパイル時間 | 1,234 ms |
| コンパイル使用メモリ | 185,404 KB |
| 実行使用メモリ | 11,944 KB |
| 最終ジャッジ日時 | 2026-03-20 09:44:44 |
| 合計ジャッジ時間 | 133,798 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 1 TLE * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int i;
int N;
int iCnt;
ios::sync_with_stdio( false );
cin.tie( 0 );
cin >> N;
vector<int> p( N );
vector<int> A( N );
iota( A.begin(), A.end(), 1 );
for( i = 0; i < N; i++ ) cin >> p[ i ];
iCnt = 0;
do
{
iCnt++;
if( A == p ) break;
}
while( next_permutation( A.begin(), A.end() ) );
cout << iCnt << endl;
return 0;
}