結果
問題 |
No.2324 Two Countries within UEC
|
ユーザー |
|
提出日時 | 2023-05-28 14:22:16 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 402 bytes |
コンパイル時間 | 1,855 ms |
コンパイル使用メモリ | 166,604 KB |
実行使用メモリ | 14,592 KB |
最終ジャッジ日時 | 2024-12-27 00:47:49 |
合計ジャッジ時間 | 100,324 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 9 WA * 1 TLE * 31 |
ソースコード
#include<iostream> #include<vector> #include <bits/stdc++.h> using namespace std; int main(){ int N,M,P,Q; cin>>N>>M>>P>>Q; vector <int> x(Q), f(Q); for(int i=0; i<Q; i++){ cin>>x[i]>>f[i]; } for(int i=0; i<Q; i++){ int ans=0; for(int l=0; l<M+1; l++) if(l*x[i]%P==f[i]){ ans++; } cout<<ans<<endl; } }