Dressing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2674 Accepted Submission(s): 1179 Problem Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K…
HDU 4451 Dressing 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=4451 Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K different combinations of dressing. One day he wears his pants Nike, shoes Adiwang t…
Dressing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3735 Accepted Submission(s): 1681 Problem Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K…
有衣服.裤子.鞋数量分别为n,m,k,给出p对不和谐的衣-裤或裤-鞋搭配,问一共有多少种和谐的衣裤鞋的搭配. 全部的组合有Cn1Cm1Ck1种. 设p对中有p1对衣-裤,p2对裤-鞋,则不和谐的搭配共有p1*Ck1+p2*Cn1种,但有被重复计算两次的搭配共p3对,它们引用了同一裤.设裤 i 在p1被引用 li 次,在p2被引用 ri 次,则p3=∑(1*Cli1Cri1).所以答案为n*m*k-p1*k-p2*n+p3 #include <cstdio> #include <cstri…
Dressing Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2964 Accepted Submission(s): 1291 Problem Description Wangpeng has N clothes, M pants and K shoes so theoretically he can have N×M×K differ…
转载请注明出处:http://blog.csdn.net/u012860063? viewmode=contents 题目链接:pid=4279">http://acm.hdu.edu.cn/showproblem.php?pid=4279 HDU集训队选拔赛地点:3教3楼机房,时间:5月10日(周六)12:00開始.请相互转告,谢谢~ 百度之星编程大赛--您报名了吗? Number Time Limit: 2000/1000 MS (Java/Others) Memory Lim…
题意:在[a,b] [c,d] 之间,和模p等于m的对数 详见代码 #include <stdio.h> #include <algorithm> #include <string.h> #include<cmath> #define LL long long using namespace std; int T; LL a,b,c,d,p,m; LL gcd(LL a, LL b) { return b ? gcd(b, a % b) : a; } LL…
Just Random Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 87 Accepted Submission(s): 34 Problem Description Coach Pang and Uncle Yang both love numbers. Every morning they play a game with…
2018 HDU多校第四场赛后补题 自己学校出的毒瘤场..吃枣药丸 hdu中的题号是6332 - 6343. K. Expression in Memories 题意: 判断一个简化版的算术表达式是否合法. 题解: 注意细节即可. 代码: #include <bits/stdc++.h> using namespace std; int n; char s[505]; int main () { int T; cin>>T; for ( ; T; --T) { scanf(&quo…
2018 HDU多校第三场赛后补题 从易到难来写吧,其中题意有些直接摘了Claris的,数据范围是就不标了. 如果需要可以去hdu题库里找.题号是6319 - 6331. L. Visual Cube 题意: 在画布上画一个三维立方体. 题解: 模拟即可. 代码: #include <bits/stdc++.h> using namespace std; int a, b, c, R, C; char g[505][505]; int main () { int T; cin >>…
Jessie and Justin want to participate in e-sports. E-sports contain many games, but they don't know which one to choose, so they use a way to make decisions. They have several boxes of candies, and there are ii candies in the i^{th}ith box, each cand…