// Problem: G - Palindrome Construction // Contest: AtCoder - AtCoder Beginner Contest 349 // Author: Moyou // Copyright (c) 2024 Moyou All rights reserved. // Date: 2024-04-14 16:55:53 #include <algorithm> #include <iostream> #include <queue> using namespace std; const int N =...
AtCoder Beginner Contest 349 A~F AC-Panda 敲代码的老熊猫 11 人赞同了该文章 A. Zero Sum Game(思维) 题意 有N个人一起参加游戏,开始时每个人均拥有0点分数。每轮游戏只会在两个人之间进行,胜者将得到1分,败者将失去1分。已知结束游戏后前N−1个人的分数A1,A2,…,AN−1,问,最后一个人的分数是...
AtCoder Beginner Contest 243(E、F、G补题) E - Edge Deletion题意:给定nn点mm边的无向图,现在问你最多删除多少条边,可以使得图中的每对点的的最短距离不发生变化思路:根据数据范围n≤300n≤300提示,可以发现需要用floydfloyd算法,算出每对点之间的最短距离后,然后枚举每条边,如果当前边的距离小于最短...
AtCoder Beginner Contest 333 A~F AC-Panda 敲代码的老熊猫A.Three Threes(循环) 题意: 给出一个正整数N,要求输出N个N 分析: 按要求输出即可 代码: #include <bits/stdc++.h> using namespace std; void solve() { int n; cin >> n; for (int i = 1; i <= n; i++) { cout << n; ...
AtCoder Beginner Contest 052 ABCD题 A - Two Rectangles Time limit : 2sec /Memory limit : 256MB Score :100points Problem Statement There are two rectangles. The lengths of the vertical sides of the first rectangle areA, and the lengths of the horizontal sides of the first rectangle areB. ...
AtCoder Beginner Contest 180 个人题解(快乐DP场) A - box 输出\(N - A + B\) B - Various distances 按题意输出 3 种距离即可 #include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios_base::sync_with_stdio(false), cin.tie(0);...
[AtCoder Beginner Contest 365](https://atcoder.jp/contests/abc365) 题解 ABC365的比赛题解,我做出G题了,但暂时不发,需要的请私信 私信前请看:https://www.luogu.com.cn/paste/lowgb1lx ### A - Leap Year [翻](https://blog.csdn.net/qianzhima2012/article/details/141070004?spm=1001.2014.3001....
AtCoder Beginner Contest 215 (个人题解 A~F)比赛链接:Here AB水题, C - One More aab aba baa 题意: 给出字符串 (s) 和整数 (k) ,请输出字典序第 (k) 大的原字符串 (s) 的排序 思路: 先说简单写法: 利用C++ 内置函数 next_permutation 直接排序即可(代码一) 复杂写法: 枚举情况,设字符串...
给定参数a, b, c, d,输出(a + b) * (c - d)加一个名字即可。 代码: signedmain(){int a,b,c,d;cin>>a>>b>>c>>d;cout<<(a+b)*(c-d)<<endl;puts("Takahashi");} B - Rectangle Detection 模拟 题意: 输入一个10 * 10的矩阵,求#的矩阵的左上角和右下角。