結果
| 問題 | No.1495 パンの仕入れ |
| コンテスト | |
| ユーザー |
akakimidori
|
| 提出日時 | 2021-03-31 13:31:42 |
| 言語 | C++17(gcc12) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,248 bytes |
| 記録 | |
| コンパイル時間 | 6,517 ms |
| コンパイル使用メモリ | 255,348 KB |
| 実行使用メモリ | 22,168 KB |
| 最終ジャッジ日時 | 2026-06-19 02:40:51 |
| 合計ジャッジ時間 | 12,427 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | WA * 46 |
ソースコード
#include "testlib.h"
#include <vector>
#include <iostream>
#include <cassert>
using i64 = long long;
const int MIN_T = 1;
const int MAX_T = 100;
const int MIN_N = 1;
const int MAX_N = 200000;
const int MIN_M = 1;
const int MAX_M = 200000;
const int MIN_K = 1;
const int MAX_K = 1000000000;
int main(int argc, char** argv) {
registerValidation(argc, argv);
const int T = inf.readInt(MIN_T, MAX_T, "T");
inf.readEoln();
int sum_N = 0;
int sum_M = 0;
for (int i = 0; i < T; ++i) {
const int N = inf.readInt(MIN_N, MAX_N, "N");
inf.readSpace();
const int M = inf.readInt(MIN_M, MAX_M, "M");
inf.readSpace();
const int K = inf.readInt(MIN_K, MAX_K, "K");
inf.readEoln();
sum_N += N;
sum_M += M;
assert(sum_N <= MAX_N);
assert(sum_M <= MAX_M);
assert((i64) K * K <= 1000000000000000000LL / M);
for (int j = 0; j < M; ++j) {
inf.readInt(1, N, "x");
inf.readSpace();
const int y = inf.readInt(1, MAX_K, "y");
inf.readEoln();
assert((i64) y * y <= 1000000000000000000LL / M);
}
}
inf.readEof();
std::cout << "validator" << std::endl;
return 0;
}
akakimidori