int>> g(n); auto bfs = [&](int sv) { vector<int> d(n, INF); queue<int> q; q.push(sv); d[sv] = 0; while (q.size()) { int v = q.front(); q.pop(); for (int u : to[v]) { if (d[u] != INF) continue...
AC代码: https://atcoder.jp/contests/abc299/submissions/42093751 题意: 我们有一个长度为N的序列A,由1到M之间的整数组成。 这里,从1到M的每个整数在A中至少出现一次。 在A的长度为M的子序列中,其中1,…,M每个出现一次,找到字典序最小的一个。 题解: stack #include"stdafx.h"#include<iostream>#incl...
ABC359F ABC360F ABC360G ABC363F ABC365F ABC368E ABC368F ABC368G ABC369F ABC372F ABC377F ABC378F ABC380F ABC382F ABC383F ABC384F ABC385F ABC386F ABC388F ABC388G ABC 做题记录 参见:旧 AT 杂题记录 1、旧 AT 杂题记录 2 ABC001-099# Nothing Yet. ABC100-199# *ABC141F(Difficult...
给定由 .、|、* 三种字符组成的长度为 n 的字符串 s,保证 | 的个数为 2,* 的个数为 1。 判断* 是否在两个 | 之间。 代码 #include <cstring> #include <iostream> #define f(x, y, z) for (int x = (y); x <= (z); ++x) using namespace std; int constexpr N = 1e2 + 10; ...
AtCoder Beginner Contest 299 EFG 讲解比赛地址:https://atcoder.jp/contests/abc299/tasks比赛时间:2023-04-22(Sat) 20:00 - 2023-04-22(Sat) 21:40 (local time) (100 minutes)E Nearest Black Vertex:BFSF Square Subsequ, 视频播放量 1053、弹幕量 2、点赞数 47、
this is my solution to problem: https://atcoder.jp/contests/abc299/tasks/abc299_e My logic is to colour all vertices black and then white if their distance is less than d for a given condition. Is that right? If it isn't, what's the issue, and if it is, where am I going wro...
https://atcoder.jp/contests/abc335/tasks/abc335_d 代码分享 代码语言:javascript 代码运行次数:0 运行 AI代码解释 #include <bits/stdc++.h> using namespace std; int g[50][50], a; void color(int start, int m) { for (int i = start; i < m; ++i) { g[start][i] = a; ++a; ...
Why did this contest comes in Sunday.But ABC361 is on Saturday. → Reply ZombieUser 8 months ago, # ^ | 0 ABC rounds are usually held on Saturdays but this time ARC round was scheduled on Saturday hence this was scheduled on Sunday. → Reply Wayne13770834134_ 8 months ago, #...
} else if(r <= 299) { cout << 300 - r << endl; } } 38 changes: 38 additions & 0 deletions 38 ABC363/B.cpp Original file line numberDiff line numberDiff line change @@ -0,0 +1,38 @@ #include <bits/stdc++.h> #include <atcoder/all> using namespace std; using namespace...
int main(){ int n; cin >> n; if(n >= 200 && n <= 299) cout << …阅读全文 赞同14 4 条评论 分享收藏 AtCoder Beginner Contest 400 A-F 简易题解,如果题解中有什么问题可以找我反馈,谢谢! A.ABC400 Party 判断 是不是 的因子,如果不是则无解,是则答案为 。