A. Combination Lock time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Scrooge McDuck keeps his most treasured savings in a home safe with a combination lock. Each time he wants to put there…
Discription The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors andp papers. At some moments of time two random individuals meet (all pairs of individuals can meet equiprobably), and if they belong to different species, th…
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…