結果
| 問題 | No.2359 A in S ? |
| コンテスト | |
| ユーザー |
遭難者
|
| 提出日時 | 2023-05-23 13:21:27 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 825 bytes |
| 記録 | |
| コンパイル時間 | 5,116 ms |
| コンパイル使用メモリ | 374,340 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2026-06-04 09:59:13 |
| 合計ジャッジ時間 | 12,963 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 6 TLE * 2 -- * 10 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i, n) for (int i = 0; i < n; i++)
#define ALL(a) a.begin(), a.end()
#define ll int
#define pii pair<int, int>
#define pil pair<int, ll>
#define pli pair<ll, int>
#define vc vector
using namespace std;
constexpr int inf = 1e5 + 1;
int a[inf];
void solve()
{
int n, m;
cin >> n >> m;
rep(k, n)
{
int l, r, x, y;
cin >> l >> r >> x >> y;
l = (l - y + x - 1) / x * x + y;
r = (r - y + x) / x * x + y;
while (l < r)
{
a[l]++;
l += x;
}
}
for (int i = 0, x; i < m; i++)
{
cin >> x;
cout << a[x] << '\n';
}
}
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
cout << fixed << setprecision(13);
solve();
return 0;
}
遭難者