結果
| 問題 |
No.3023 Utility is Max?
|
| コンテスト | |
| ユーザー |
ジュ・ビオレ・グレイス
|
| 提出日時 | 2025-02-14 22:47:07 |
| 言語 | D (dmd 2.109.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 582 bytes |
| コンパイル時間 | 2,806 ms |
| コンパイル使用メモリ | 90,384 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2025-02-14 22:47:16 |
| 合計ジャッジ時間 | 8,578 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | AC * 1 WA * 16 |
ソースコード
import std.algorithm, std.array, std.container, std.conv, std.math, std.range, std.stdio, std.typecons;
void main() {
auto Q = readln[0 .. $-1].to!uint;
bool[] ans;
foreach (q; 0 .. Q) {
auto I = readln[0 .. $-1].to!long;
auto tmp1 = readln.split.to!(long[]), tmp2 = readln.split.to!(long[]);
auto A1 = tmp1[0], B1 = tmp1[1], X1 = tmp1[2], Y1 = tmp1[3];
auto A2 = tmp2[0], B2 = tmp2[1], X2 = tmp2[2], Y2 = tmp2[3];
ans ~= A1*X1 + B1*Y1 <= I && A2*X2 + B2*Y2 <= I && (I - A1*X1) <= B1*Y1 && (I - A2*X2) <= B2*Y2;
}
foreach (a; ans) {
writeln(a ? "Yes" : "No");
}
}
ジュ・ビオレ・グレイス