結果
| 問題 |
No.2089 置換の符号
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-30 22:57:44 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 173 ms / 2,000 ms |
| コード長 | 221 bytes |
| コンパイル時間 | 665 ms |
| コンパイル使用メモリ | 63,104 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 00:41:49 |
| 合計ジャッジ時間 | 2,605 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 33 |
コンパイルメッセージ
main.cpp:4:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
4 | main()
| ^~~~
ソースコード
#include<iostream>
using namespace std;
int N,A[10000];
main()
{
cin>>N;
int ans=1;
for(int i=0;i<N;i++)
{
cin>>A[i];
for(int j=0;j<i;j++)if(A[j]>A[i])ans=-ans;
}
cout<<ans<<endl;
}