結果
| 問題 | No.3475 Many Hello Substrings |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-03-20 22:45:41 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| コード長 | 462 bytes |
| 記録 | |
| コンパイル時間 | 2,082 ms |
| コンパイル使用メモリ | 330,980 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2026-03-20 22:45:44 |
| 合計ジャッジ時間 | 2,607 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
// llohe/llohe/llo
bool solve(){
ll n, p, k;
cin >> n >> p >> k;
if(k == 0) return true;
if(n < 5) return false;
if((n * p) / 5 < k) return false;
if(k % p == 0) return true;
k -= p - 1;
n -= 5;
if(k % p != 0) return false;
return k <= p * (n / 5);
}
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int T;
cin >> T;
while(T--) cout << (solve() ? "Yes" : "No") << '\n';
}