1923. Tanning SalonTime Limit: 1.0 Seconds Memory Limit: 65536KTotal Runs: 924 Accepted Runs: 556Tan Your Hide, Inc., owns several coin-operated tanning salons. Research has shown that if a customer arrives and there are no beds available, the customer will turn around and leave, thus costing the c.
转载 2012-08-15 21:25:00
47阅读
2评论
//注意下控制格式 #include #include #include using namespace std;bool is_match(queue q,int num){ int i,j,k; stack s; for(i=1;i>T,T) { while(1) { queue s; int num,temp=1;//temp必须初始化为非零值,否则下一次的temp直接为0 for(i=1;i>num; if(num==0) ...
转载 2012-08-10 09:47:00
114阅读
2评论
//组数:卡塔南公式 //大致题意:输出所有可能出战顺序 #include #include #include using namespace std; bool is_ok(int *a,int n){ int i,j,k=0; stack s; for(i=1;i>T; while(T--) { cin>>n; for(i=0;i<n;i++) a[i] = i+1; do { if(is_ok(a,n)) ...
转载 2012-08-09 17:01:00
36阅读
2评论
//用c语言做的话会很快,主要锻炼一下string的使用 ,但是老提示reverse未声明 #include #include #include #include using namespace std;int main(){ int i,T; cin>>T; while(T--) { string s; /* while(cin>>s) { if(s=="\n") { cout>s; for(i=s.length()-1;i>...
转载 2012-08-10 11:14:00
102阅读
2评论
1601. Box of BricksTime Limit: 1.0 Seconds Memory Limit: 65536KTotal Runs: 5007 Accepted Runs: 1950Little Bob likes playing with his box of bricks. He puts the bricks one upon another and builds stacks of different height. "Look, I've built a wall!", he tells his older sister Alice. &q
转载 2012-08-15 19:20:00
72阅读
2评论
1547. To and FroTime Limit: 1.0 Seconds Memory Limit: 65536KTotal Runs: 885 Accepted Runs: 692Mo and Larry have devised a way of encrypting messages. They first decide secretly on the number of columns and write the message (letters only) down the columns, padding with extra random letters so as to.
转载 2012-08-15 18:11:00
61阅读
2评论
对b[v]整除得到x的a[i]加上一个add。小编直接说优化方法了,对于前一个取模,可以先把结果存在一个c[v
原创 2022-08-30 10:47:37
54阅读
4108.   Hearthstone Time Limit: 1.0 Seconds   Memory Limit: 65536K Total Runs: 5   Accepted Runs: 2 Muxiaokui now is wild about a card game named Hearthstone. In this game ,you shou
原创 2023-04-24 02:27:54
57阅读
排版题.输出三角形的字符 Problem 用英文大写字母排列出一个三角形 Input 一个整数N (0char ch='A';int n;void pr...
原创 2021-08-05 15:02:52
155阅读
2944.Mussy PaperTime Limit:2.0 Seconds Memory Limit:65536K Special JudgeTotal Runs:381 Accepted Runs:98A good mathematical joke is better, and better ...
转载 2015-11-01 22:44:00
40阅读
2评论
数,
原创 2022-08-30 10:47:15
82阅读
原创 2022-08-30 10:51:37
81阅读
全排序问题 Problem 将一个字符组全排序 Input 一个长度小于10的字符串,该字符串由数字1~9组成。字符不会重复出现。 ...
转载 2021-08-05 14:29:52
42阅读
2710: 过河 Time Limit(Common/Java):1000MS/1000
转载 2017-10-21 09:25:00
90阅读
2评论
DescriptionThe number x is called a square root of a modulo n (root(a,n)) if x*x = a (mod n). Write the program to find the square root of number a by given modulo n.Description题意就是让你求二次剩余嘛。 这个时候就轮到C
原创 2022-12-26 18:16:25
230阅读
2710: 过河 Time Limit(Common/Java):1000M
转载 2017-10-21 09:25:00
70阅读
2评论
2233.WTommy's TroubleTime Limit:2.0 Seconds Memory Limit:65536KTotal Runs:1499 Accepted Runs:437As the captain, WTommy often has to inform all the TJU...
转载 2015-04-08 22:47:00
96阅读
2评论
2710: 过河 Time Limit(Common/Java):1000MS/10000MS Memory Limit:65536KByteTotal Submit: 32 Acc...
转载 2017-10-21 09:25:00
47阅读
2710: 过河 Time Limit(Common/Java):1000MS/10000MS Memory Limit:65536KByteTotal Submit: 32 Acc...
转载 2017-10-21 09:25:00
31阅读
题目链接:http://acm.tju.edu.cn/toj/showp4153.html题目很长,但是题意实际上是说……求一个最大上升子序列长度……#include <cstdio>#include <cstring>#include <iostream>#include <algorithm>using namespace std;const i
原创 2022-08-30 10:47:43
51阅读
  • 1
  • 2
  • 3