自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(17)
  • 收藏
  • 关注

原创 日期处理

#include<iostream> #include<algorithm> using namespace std; int month[13][2] = {{0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}, {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}}; bool isLeap(int year){ return (year

2021-05-01 20:32:11 78

原创 进制转换

从10进制转为k进制 #include<iostream> using namespace std; int main(){ int n, k; cin >> n >> k; int a[100], cnt = 0; while(n != 0){ int temp = n % k; a[cnt++] = temp; n /= k; } for(int i = cnt - 1; i >= 0; i--)

2021-05-01 20:29:46 44

原创 第十一届蓝桥杯C++试题 子串分值和

#include<iostream> #include<algorithm> #include<map> #include<cstdio> #include<cstring> using namespace std; int main(){ string s; cin >> s; long long cnt = 0; int hashmap[128] = {}, pos[128] = {}; for(int i = 0;

2021-03-23 21:58:15 621

原创 1001 A+B Format

#include<iostream> #include<algorithm> using namespace std; int main(){ int a, b; scanf("%d%d", &a, &b); int sum = a + b; if(sum < 0) { printf("-"); sum = -sum; } string s = to_string(sum), s1; int len = s.length(); int c

2021-03-17 19:41:48 69

原创 1061 Dating

#include<iostream> #include<algorithm> using namespace std; string a[7] = {"MON", "TUE", "WED", "THU", "FRI", "SAT", "SUN"}; int main(){ string s1, s2, s3, s4; cin >> s1 >> s2 >> s3 >> s4; int flag = 0; for(int i = 0

2021-03-16 20:47:40 36

原创 1058 A+B in Hogwarts

#include<iostream> #include<algorithm> using namespace std; int main(){ long long a1, b1, c1, a2, b2, c2; scanf("%lld.%lld.%lld %lld.%lld.%lld", &a1, &b1, &c1, &a2, &b2, &c2); long long sum = (a1 + a2) * 29 * 17 + (b1

2021-03-16 16:23:53 32

原创 1027 Colors in Mars

#include<iostream> #include<algorithm> using namespace std; char a[13] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C'}; int main(){ int r, g, b; scanf("%d%d%d", &r, &g, &b); printf("#"); printf("%c%c", a[r /

2021-03-16 16:05:51 34

原创 1019 General Palindromic Number

#include<iostream> #include<algorithm> #include<vector> using namespace std; int main(){ int n, b, flag = 0; vector<int> v; cin >> n >> b; if(n == 0) { printf("Yes\n0"); return 0; } while(n){ int temp = n % b

2021-03-16 15:19:41 47

原创 1031 Hello World for U

#include<iostream> #include<cstdio> #include<cstring> using namespace std; int main(){ string s; cin >> s; int len = s.length(); int nL = 1, nR = 1, cnt = 0, n1, i; for(nL = 1; nL <= n1; nL++, n1 = len + 2 - 2 * nL); nL--;

2021-03-15 20:19:20 52

原创 1036 Boys vs Girls

#include<iostream> #include<algorithm> #include<cmath> #include<map> using namespace std; struct node{ string name, gen, sub; int sc; }stu; int main(){ int n, max1 = -1, min1 = 101; string str1, str2, str11, str22; scanf("%d",

2021-03-15 20:18:42 48

原创 1006 Sign In and Sign Out

#include<iostream> #include<algorithm> #include<cmath> #include<map> using namespace std; int main(){ int n; scanf("%d", &n); string str, str1, str2; int hh1, mm1, ss1, hh2, mm2, ss2, min = 999999, max = -1; for(int i = 0;

2021-03-15 20:17:59 41

原创 1011 World Cup Betting

#include<iostream> #include<algorithm> #include<cmath> #include<map> using namespace std; char s[3] = {'W', 'T', 'L'}; int main(){ double ans = 1.0, tmp, a; int idx; for(int i = 0; i < 3; i++){ tmp = 0.0; for(int j = 0; j

2021-03-15 20:17:20 40

原创 1009 Product of Polynomials

#include<iostream> #include<algorithm> #include<cmath> #include<map> using namespace std; struct node{ int exp; double coe; }a[30], b[30]; map<int, double> c; int main(){ int n1, n2, cnt = 0; scanf("%d", &n1); for(

2021-03-15 20:16:17 44

原创 1002 A+B for Polynomials

#include<iostream> using namespace std; struct node{ int exp; double coe; }a[30], b[30], c[30]; int main(){ int n1, n2; scanf("%d", &n1); for(int i = 0; i < n1; i++){ scanf("%d%lf", &a[i].exp, &a[i].coe); } scanf("%d", &am

2021-03-14 19:32:28 36

原创 1065 A+B and C (64bit)

#include<iostream> #include<algorithm> #include<cmath> using namespace std; typedef long long ll; int main(){ ll a, b, c, n; scanf("%lld", &n); for(ll i = 0; i < n; i++){ scanf("%lld%lld%lld", &a, &b, &

2021-03-13 21:35:33 52

原创 1042 Shuffling Machine

#include<iostream> using namespace std; int a[55]; string s[55] = {"", "S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8", "S9", "S10", "S11", "S12", "S13", "H1", "H2", "H3", "H4", "H5", "H6", "H7", "H8", "H9", "H10", "H11", "H12", "H13", "C1", "

2021-03-13 20:31:40 47

原创 1046 Shortest Distance

#include<iostream> #include<algorithm> using namespace std; int main(){ int n, n1; scanf("%d", &n); int dis[n + 1], sum[n + 1]; sum[0] = 0; for(int i = 1; i <= n; i++){ scanf("%d", &dis[i]); sum[i] = dis[i] + sum[i -

2021-03-13 20:29:59 62

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除