Codeforces Round #619 (Div. 2)D(模拟)】的更多相关文章

先把一种最长路线记录下来,根据k的大小存到ans中相应的答案再输出 #define HAVE_STRUCT_TIMESPEC #include<bits/stdc++.h> using namespace std; vector<char>vv; vector<pair<int,char>>ans; int main(){ ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n,m,…
C. Cardiogram time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output In this problem, your task is to use ASCII graphics to paint a cardiogram. A cardiogram is a polyline with the following corner…
C. Thor time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Thor is getting used to the Earth. As a gift Loki gave him a smartphone. There are n applications on this phone. Thor is fascinated…
依照题意暴力模拟即可A掉 #include <cstdio> #include <algorithm> #include <cstring> #include <set> using namespace std; ]; ]; int main(){ scanf("%d %d",&n,&k); scanf(); ;i<=n;i++) barrel[s[i]-]++; int ans=0x3f3f3f3f; ;i<…
B. Vasya and Wrestling time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has become interested in wrestling. In wrestling wrestlers use techniques for which they are awarded points by…
A. Vasya and Football time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Vasya has started watching football games. He has learned that for some fouls the players receive yellow cards, and fo…
B. Barnicle time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Barney is standing in a bar and starring at a pretty girl. He wants to shoot her with his heart arrow but he needs to know the di…
题:https://codeforces.com/contest/1301/problem/E 题意:给个n*m的图形,q个询问,每次询问问询问区间最大的合法logo的面积是多少 分析:由于logo是由4个同色的小正方形组成的,所以我们先考虑一个数组val[i][j]表示[i][j]位置为‘R' , [i+1][j]位置为’Y‘,[i][j+1]位置为’G‘,[i+1][j+1]位置为’B'所能形成的最大图案边长是多少: 因为这样就只要预处理‘R’正方形沿着左上能形成的最大正方形,“Y”沿着左下…
C. Heap Operations time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Petya has recently learned data structure named "Binary heap". The heap he is now operating with allows the following…
最近网课也开始了,牛客上一堆比赛题目也没补,所以就D题后面的也懒得补了 A.Three String 水题 #include <cstdio> #include <cstring> using namespace std; ], b[], c[]; int main() { int t; scanf("%d", &t); while (t--) { memset(a, , sizeof(a)); memset(b, , sizeof(b)); memse…