https://atcoder.jp/contests/abc309/submissions/43668984 题意: 有N个盒子。第i个盒子的形状为长方体,其高度、宽度和深度分别为hi、wi和di。 在必要时旋转两个盒子后,确定是否有两个盒子,使其中一个盒子的高度、宽度和深度严格大于另一个盒子。 题解: 树状数组 + map #include"stdafx.h"#include<iostream...
题目:https://atcoder.jp/contests/abc155/tasks/abc155_c 这道题的题意是给我们n个string,让我们统计每个string出现的次数,并输出次数最多的一个或多个string(按字典序来排列) 当时我想的是用数组来统计每个string,之后再sort一次遍历输出答案,但是我却不知道怎么用代码来实现,之后想到应该可以用map,但无奈不太...
AtCoder ABC155 C Poll **题意:**找出现次数最多的单词,如有多个,按照字典序从小到大输出。 **思路:**用一个map记录每个字符串的次数,遍历一遍即可~ 代码: #include<bits/stdc++.h>usingnamespacestd;constintmaxn=1e6+7; map<string,int>mp; string s[maxn]; std::map<string,int>::iterator it...
There are N boxes arranged in a row from left to right. The i-th box from the left contains Ai candies. You will take out the candies from some consecutive boxes and distribute them evenly to M children. Such being the case, find the number of the pairs (l,r) that satisfy the foll...
AtCoder Beginner Contest 216【C:简单思维】【D:双端队列+BFS 模拟】【E:优先队列+map 数学】 1 #include<bits/stdc++.h> 2 3 using namespace std; 4 #define int long long 5 #define pb push_back 6 7 int n; 8 vector<int> v; 9 signed main(){...
AtCoder Beginner Contest 185 (手速场) java 直接算C ( l − 1 , l − 12 )即可。由于题目中没有模数,偷懒使用了JAVA的大整数 dejavu1zz 2020/12/16 3220 IME++ Starters Try-outs 2019 题解 node.js 显然如果有多棵树,则一定会存在无法到达的点。否则直接暴力 b f s bfs bfs求每个点到其余点...
2017-10-29 08:41 − 原题地址:http://abc074.contest.atcoder.jp/tasks/arc083_b Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem St... 山杉三 0 239 Restoring Road Network 2017-09-17 20:53 − D - Restoring Road Network Time limit : 2sec / Memory lim...
There are N boxes arranged in a row from left to right. The i-th box from the left contains Ai candies. You will take out the candies from some consecutive boxes and distribute them evenly to M children. Such being the case, find the number of the pairs (l,r) that satisfy the foll...
AtCoder Beginner Contest 216【C:简单思维】【D:双端队列+BFS 模拟】【E:优先队列+map 数学】【F:背包问题+优化】 1#include<bits/stdc++.h>23usingnamespacestd;4#defineint long long5#definepb push_back67intn;8vector<int>v;9signed main(){10cin>>n;11while(n){12if(n%2==0)13v.pb(1)...
import java.text.SimpleDateFormat; import java.util.HashMap; import java.util.Map; public class MapToBeanUtil { private final static SimpleDateFormat yMdHms_sdf_util = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); public static Map<String, Object> convertBeanToMap(Object obj) { ...