結果
| 問題 | No.810 割った余りの個数 |
| コンテスト | |
| ユーザー |
tac
|
| 提出日時 | 2019-07-09 23:29:15 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 563 bytes |
| 記録 | |
| コンパイル時間 | 1,562 ms |
| コンパイル使用メモリ | 175,560 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-04-29 23:30:57 |
| 合計ジャッジ時間 | 3,008 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 30 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:20:8: warning: ignoring return value of 'constexpr const _Tp& std::min(const _Tp&, const _Tp&) [with _Tp = int]', declared with attribute 'nodiscard' [-Wunused-result]
20 | min(r - (l - 1), n);
| ~~~^~~~~~~~~~~~~~~~
In file included from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/algorithm:62,
from /home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/x86_64-pc-linux-gnu/bits/stdc++.h:53,
from main.cpp:1:
/home/linuxbrew/.linuxbrew/Cellar/gcc/15.2.0_1/include/c++/15/bits/stl_algobase.h:234:5: note: declared here
234 | min(const _Tp& __a, const _Tp& __b)
| ^~~
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define F first
#define S second
#define pii pair<int, int>
#define eb emplace_back
#define all(v) v.begin(), v.end()
#define rep(i, n) for (int i = 0; i < n; ++i)
#define rep3(i, l, n) for (int i = l; i < n; ++i)
#define chmax(a, b) a = max(a, b)
#define chmin(a, b) a = min(a, b)
#define out(a) cout << a << endl
#define SZ(v) (int)v.size()
#define inf (int)(1e9+7)
int main() {
int l, r, n; cin >> l >> r >> n;
//[l, r]の個数がn個あれば全てある
min(r - (l - 1), n);
}
tac