正文
增加 7 行删除 7 行
129 行未改动全部展开1301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601616 行未改动1681691701711721731741751761771781799 行未改动129 行未改动全部展开int main() {ios::sync_with_stdio(false);cin.tie(nullptr);int c, T;cin >> c >> T;const int MOD = 3233779;while (T--) {int n; ll k;cin >> n >> k;vector<ll> a(n);for (int i = 0; i < n; ++i) cin >> a[i];// 构造扩展数组 A 的前缀和 pre,长度 2n+1vector<ll> pre(2 * n + 1, 0);for (int i = 1; i <= 2 * n; ++i) {int idx = (i - 1) % n; // 对应 A 的下标pre[i] = pre[i - 1] + a[idx];}// 建立值到下标列表的映射unordered_map<ll, vector<int>> pos;for (int i = 0; i <= 2 * n; ++i) {pos[pre[i]].push_back(i);}int ans = 0;// t 从 0 到 n-1for (int t = 0; t < n; ++t) {ll target = pre[t] + k;6 行未改动ans++;}}}cout << ans % MOD << '\n';}return 0;}```9 行未改动129 行未改动全部展开1301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601616 行未改动1681691701711721731741751761771781799 行未改动129 行未改动全部展开int main() {ios::sync_with_stdio(false);cin.tie(nullptr);int c, T;cin >> c >> T;const int MOD = 3233779;while (T--) {int n; ll k;cin >> n >> k;vector<ll> a(n);for (int i = 0; i < n; ++i) cin >> a[i];// 构造扩展数组 A 的前缀和 pre,长度 2n+1vector<ll> pre(2 * n + 1, 0);for (int i = 1; i <= 2 * n; ++i) {int idx = (i - 1) % n; // 对应 A 的下标pre[i] = pre[i - 1] + a[idx];}// 建立值到下标列表的映射unordered_map<ll, vector<int>> pos;for (int i = 0; i <= 2 * n; ++i) {pos[pre[i]].push_back(i);}int ans = 0;// t 从 0 到 n-1for (int t = 0; t < n; ++t) {ll target = pre[t] + k;6 行未改动ans++;}}}cout << ans % MOD << '\n';}return 0;}```9 行未改动