結果
| 問題 |
No.3260 岩井スターグラフ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-06 15:11:33 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 386 bytes |
| コンパイル時間 | 3,397 ms |
| コンパイル使用メモリ | 275,644 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-06 15:11:58 |
| 合計ジャッジ時間 | 8,539 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 29 WA * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll =long long;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
ll X,Y,N;
cin>>X>>Y>>N;
for(int i=0;i<N;i++){
ll U,V;
cin>>U>>V;
U--;V--;
if(U/Y==V/Y){
cout<<abs(U-V)<<"\n";
}
else{
cout<<(U%Y)+1+(V%Y)+1<<"\n";
}
}
}