結果
| 問題 |
No.3361 2解間格子点
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-15 19:46:50 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 407 bytes |
| コンパイル時間 | 2,988 ms |
| コンパイル使用メモリ | 275,288 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-11-15 19:46:55 |
| 合計ジャッジ時間 | 5,464 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 65 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, s, e) for (int i = (int)(s); i < (int)(e); ++i)
int main() {
cin.tie(nullptr);
ios_base::sync_with_stdio(false);
ll A, B, C;
cin >> A >> B >> C;
if (A < 0) {
A *= -1;
B *= -1;
C *= -1;
}
int ans = 0;
for (ll x = -1000010; x <= 1000010; ++x) {
if (A*x*x + B*x + C < 0) ++ans;
}
cout << ans << '\n';
}