A. Water Buying 链接:http://codeforces.com/contest/1118/problem/A 实现代码: #include<bits/stdc++.h> using namespace std; #define ll long long int main() { ll n,a,b,m; cin>>n; ;i <= n;i ++){ cin>>m>>a>>b; <= b) cout<<m*a…
https://codeforces.com/contest/1118/problem/C 在查找元素的时候,必须按4,2,1的顺序进行.因为,如果先找1,可能就把原来的4拆散了,然后再找4,就找不到了 #include<bits/stdc++.h> using namespace std; ][]; int main(){ int n; cin>>n; map<int,int> mp; int t; ;i<n*n;i++){ cin>>t; mp[t…
任意门:http://codeforces.com/contest/1118/problem/F1 F1. Tree Cutting (Easy Version) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an undirected tree of nn vertices. Some vert…
任意门:http://codeforces.com/contest/1118/problem/D1 D1. Coffee and Coursework (Easy version) time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output The only difference between easy and hard versions…