tie(nullptr); size_t n; cin >> n; for (size_t i = 1; i <= n; i++) { cin >> a[i]; } dp[0][1] = -INF; for (size_t i = 1; i <= n; i++) { dp[i][0] = max(dp[i - 1][1] + a[i] * 2, dp[i - 1][0]); dp[i][1] = max(dp[i - 1][0]...
B - Piano 3 (abc369 B)题目大意谈钢琴,给出左右手依次要弹奏的键,问左右手移动的距离数。解题思路模拟即可,用一个map记录左右手当前位置,然后移动到下一个位置时计算距离,累计求和集合。神奇的代码 #include <bits/stdc++.h> using namespace std; using LL = long long; int main(void) { ios::...
合集- ABC(2) 1.AtCoder Beginner Contest 368(ABC368)2024-08-25 2.AtCoder Beginner Contest 369(ABC369)2024-09-01 收起 [ABC369C] Count Arithmetic Subarrays题意:判断有多少个区间是等差数列(不能重排)。1≤n×105。思路:赛时看错题了,以为这个区间可以重排,卡了 8min,小丑了。首先容易注意到,...
We will hold AtCoder Beginner Contest 369. Contest URL: https://atcoder.jp/contests/abc369 Start Time: http://www.timeanddate.com/worldclock/fixedtime.html?iso=20240831T2100&p1=248 Duration: 100 minutes Writer: yuto1115, math957963, ynymxiaolongbao Tester: toam, sounansya Rated range: ...
Atcoder ABC369 Solution Discussion (finished) Allaryanc403streams
takechi-scratch add comment abc376b e2bb8ed· Oct 19, 2024 History14 Commits abc356 fix テストケースの追跡除外 Oct 13, 2024 abc369 add abc369D Oct 14, 2024 abc371 fix テストケースの追跡除外 Oct 13, 2024 abc373 add abc376abcde_fastest Oct 19, 2024 abc374 fix テストケースの追...
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 ABC_別解 AGC AHC ARC EDPC OTHERS memo 競プロ典型90題 精選100問 comfused.md readme.md Breadcrumbs atcoder_codes /ABC /300 / 360/ Directory actions...
A - Rearranging ABC#include <bits/stdc++.h> using ll = long long; int main() { std::ios::sync_with_stdio(false); std::cin.tie(0); std::strin… 阅读全文 AtCoder Beginner Contest 376 A - F 阅读全文 AtCoder Beginner Contest 375 A - G ...
https://atcoder.jp/contests/abc285/tasks/abc285_d 板子题,解题思路就不赘述了 小码匠代码 代码语言:javascript 代码运行次数:0 运行 AI代码解释 #include<bits/stdc++.h>using namespace std;#define endl'\n';voidbest_coder(){int n;cin>>n;unordered_map<string,string>g(n);unordered_map<string...
AtCoder (ABC 369)比赛于昨晚(20:00)进行,同学们可在今晚(8月1日)19:00进入继续到直播间观看题目解析。 本次比赛讲解老师:清华大学吴老师(NOI2021银牌) 直播间地址(点击“阅读原文”也可查看): https://live.bilibili.com/21371611?live_from=84002 ...