結果
| 問題 |
No.1004 サイコロの実装 (2)
|
| コンテスト | |
| ユーザー |
mugen_1337
|
| 提出日時 | 2020-03-06 22:29:19 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 465 bytes |
| コンパイル時間 | 1,561 ms |
| コンパイル使用メモリ | 166,104 KB |
| 実行使用メモリ | 10,016 KB |
| 最終ジャッジ日時 | 2024-10-14 08:08:18 |
| 合計ジャッジ時間 | 5,535 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 WA * 18 TLE * 1 -- * 13 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
using ll=long long;
signed main(){
//偶奇が変わるのは2^32を超えるところ?
unsigned int a,b,x;cin>>a>>b>>x;
int cnt[2]={};
int p[2][2]={};
ll n;cin>>n;
rep(i,n){
x=a*x+b;
cnt[i&1]+=(x&1);
p[i&1][x&1]++;
}
cout<<(p[0][0]<p[0][1]?p[0][0]:p[0][1])<<' '<<(p[1][0]<p[1][1]?p[1][0]:p[1][1])<<"\n";
return 0;
}
mugen_1337