結果
| 問題 | 
                            No.2828 Remainder Game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             沙耶花
                         | 
                    
| 提出日時 | 2024-08-02 22:06:35 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 1,003 bytes | 
| コンパイル時間 | 4,250 ms | 
| コンパイル使用メモリ | 253,684 KB | 
| 最終ジャッジ日時 | 2025-02-23 20:03:31 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | RE * 20 | 
ソースコード
#include <stdio.h>
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 1000000000000000001
int n;
unsigned long xor128() {
	static unsigned long x=123456789, y=362436069, z=521288629, w=88675123;
	unsigned long t=(x^(x<<11));
	x=y; y=z; z=w;
	return (w=(w^(w>>19))^(t^(t>>8)));
}
int main(){
	
	cin>>n;
	vector<long long> p = {2,3,7,11,13};
	
	vector<long long> s(5);
	rep(i,5){
		vector<int> r(p[i]);
		rep(j,p[i]){
			r[j] = j;
		}
		rep(_,100){
			int a = xor128()%p[i];
			int b = xor128()%p[i];
			swap(r[a],r[b]);
		}
		int rem = 5;
		int sum = 0;
		rep(j,p[i]-1){
			if(rem==0)break;
			cout<<p[i]<<' '<<1<<endl;
			cout<<r[j]<<endl;
			int ret;
			cin>>ret;
			rem -= ret;
			sum += r[j]*ret;
		}
		sum += r[p[i]-1]*rem;
		s.push_back(sum%p[i]);
	}
	auto ans = crt(s,p);
	cout<<0<<' '<<1<<endl;
	cout<<ans.first<<endl;
    return 0;
}
            
            
            
        
            
沙耶花