A1006】的更多相关文章

第三天 A1005 Spell It Right (20 分) 题目内容 Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English. Input Specification: Each input file contains one test case. Each case occupies…
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you are supposed to find the ones who have unlocked a…
25/25,一遍过了,很开心. #include<bits/stdc++.h> using namespace std; struct record{ string id; string in_time; string out_time; }; vector<record> records; void solve(){ int m; cin>>m; int t=0; int unlockman=0; int lockman=0; string earliest_in,l…
思路:在图的外面包一圈'0'字符,然后dfs统计'0'字符的个数和'1'字符的个数.结果如下(num0表示0字符的个数,num1表示1字符的个数): num0 == 1 && num1 == 1 : 结果为1 num0 == 2 && num1 == 1 : 结果为0 else 结果为-1 这个方法非常巧妙,可惜比赛时没想出来,直接在原图上dfs然后WA了一发后,发现有很多特殊的样例,如: (1) 00100 00100 00100 00100 (2) 11111 1000…
AC代码 #include <cstdio> #include <algorithm> #include <iostream> using namespace std; struct Sign { char SignInNumber[20]; int h, m, s; }earlist, least, temp; /* struct Time { int h, m, s } left, right, temp; */ void init() { earlist.h =…
输入n行员工id以及到达和离开的时间,输出最早到达的员工的id和最晚离开的员工的id 注:字符串赋值函数strcpy(目标字符串,原字符串)字符串之间的赋值使用该函数,需要#include<string.h> #include<cstdio> #include<string.h> int main(){ ],signoutid[],temid[]; int h1,m1,s1,h2,m2,s2,n,temin,temout; ,signout=; scanf("…
At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you are supposed to find the ones who have unlocked a…
B1004. 成绩排名 (20) Description: 读入n名学生的姓名.学号.成绩,分别输出成绩最高和成绩最低学生的姓名和学号. Input: 每个测试输入包含1个测试用例,格式为: 第1行:正整数n 第2行:第1个学生的姓名 学号 成绩 第3行:第2个学生的姓名 学号 成绩 ... ... ... 第n+1行:第n个学生的姓名 学号 成绩 其中姓名和学号均为不超过10个字符的字符串,成绩为0到100之间的一个整数,这里保证在一组测试用例中没有两个学生的成绩是相同的. Output: 对…
部分常见ORACLE面试题以及SQL注意事项 一.表的创建: 一个通过单列外键联系起父表和子表的简单例子如下: CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id) ) CREATE TABLE child(id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE ) 建表时…
SQL> select * from (select * from t1 order by id ) where rownum<20; ID A1 A2 A3 ---------- ---------- ---------- ---------- 1 1 1 a1 10 10 10 a10 100 100 100 a100 1000 1000 1000 a1000 10000 10000 10000 a10000 1001 1001 1001 a1001 1002 1002 1002 a100…