Spiker
Spiker
全部文章
分类
未归档(2)
读书笔记(3)
题解(28)
归档
标签
去牛客网
登录
/
注册
Spiker的博客
全部文章
(共37篇)
A1027 Colors in Mars
麻烦的方法一:直接套取余除基的模板,然后输出 #include<cstdio> #include<cstring> //直接用进制转换的写法要注意,补0,因为输出要求为6位; //用一个字符数组来转换大于9的数 char redix[13] = {'0','1','2...
2021-04-22
0
654
A1019 General Palindromic Number
#include<cstdio> #include<cstring> //判断是否是回文数 利用函数写,不然很麻烦 bool Judge(int a[],int num){ //判断是不是回文数 for(int i=0;i<=num/2;i++){ ...
2021-04-22
0
471
B1037 在霍格沃茨找零钱
#include<cstdio> #include<cstring> //类似于算时间之差(全部变成秒,再相减,然后转换为几个小时几分钟几秒的格式) // //这题全部转换为knut,知道1 gallon=17*29 knut,1 Sickle = 29 Knut co...
2021-04-22
0
534
A1031 Hello World for U
#include<cstdio> #include<cstring> //方法一:直接输出 int main(){ char str[100]; gets(str); int N = strlen(str); int n1,n2,n...
2021-04-21
0
496
B1036 跟奥巴马一起编程
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; int main(){ int col,row; char c; scanf("...
2021-04-13
0
450
A1036 Boys vs Girls
#include<cstdio> #include<algorithm> #include<cstring> using namespace std; struct student{ char name[12]; //姓名 char i...
2021-04-13
0
490
A1006 Sign In and Sign Out
#include<stdio.h> #include<string.h> /* 思路: 1.创建结构性变量pNode,内部成员为id和时间; 2.创建比较函数great(a,b),a的时间>b的时间话返回true; 3.输入时,把签到时间和签...
2021-04-13
0
442
B1004 成绩排名
方法1:用数组下标来表示成绩,输出时,按照stu[maxgrade]输出即可: #include<cstdio> #include<algorithm> #include<cstring> using namespace std; struct Student...
2021-04-12
0
545
B1041 考试座位号
注意点: 这题容易想到用结构体存储学生的信息; 但是可能想不到直接用数组的坐标来表示学生的试机座位,这样的话就可以少一个成员变量; #include<cstdio> struct Student{ long long id; int examseat; }stu[1...
2021-04-12
0
559
问题 F: A+B和C (15)
#include<stdio.h> #include<string.h> using namespace std; int main(){ int n; scanf("%d",&n); long long a,b,c; for...
2021-04-11
0
480
首页
上一页
1
2
3
4
下一页
末页