結果
| 問題 |
No.727 仲介人moko
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-11-14 12:38:33 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 450 bytes |
| コンパイル時間 | 1,297 ms |
| コンパイル使用メモリ | 161,616 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-11-14 12:38:36 |
| 合計ジャッジ時間 | 2,929 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 4 |
| other | WA * 25 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:12:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
12 | freopen("trade.in","r",stdin);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
main.cpp:13:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
13 | freopen("trade.out","w",stdout);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include<bits/stdc++.h>
#define int long long
using namespace std;
const int N=200010;
const int mod=1e9+7;
const int INF=0x3f3f3f3f3f3f3f3f;
int n;
signed main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
freopen("trade.in","r",stdin);
freopen("trade.out","w",stdout);
cin>>n;
int ans=1;
for(int i=1;i<=n;i++)ans=ans*i%mod;
for(int i=1;i<=n;i++)ans=ans*i%mod;
for(int i=2*n-1;i>=1;i-=2)ans=ans*i%mod;
cout<<ans<<"\n";
return 0;
}
vjudge1