結果
| 問題 | No.3475 Many Hello Substrings |
| コンテスト | |
| ユーザー |
tau1235
|
| 提出日時 | 2026-03-20 21:50:10 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 364 bytes |
| 記録 | |
| コンパイル時間 | 3,599 ms |
| コンパイル使用メモリ | 331,228 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-20 21:50:25 |
| 合計ジャッジ時間 | 2,221 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
void solve(){
using ll=long long;
ll n,p,k;
cin>>n>>p>>k;
bool ans=false;
{
ll i=k/p;
if (5*i<=n&&p*i==k) ans=true;
}
{
ll i=(k-(p-1))/p;
if (5*(i+1)<=n&&p*i+(p-1)==k) ans=true;
}
if (ans) cout<<"Yes\n";
else cout<<"No\n";
}
int main(){
int t;
cin>>t;
while (t--) solve();
}
tau1235