字符计数 #include<stdio.h> int main(){ long nc; nc = 0; while(getchar()!=EOF) ++nc; printf("%ld\n",nc); } 下面是for循环的代码: #include<stdio.h> int main(){ doubl ...
分类:
其他好文 时间:
2021-03-05 13:15:59
阅读次数:
0
B. Berland Crossword \(直接去枚举四个角落,注意枚举的方法,本题如何写的简洁很关键.\) #include <bits/stdc++.h> using namespace std; #define IO ios::sync_with_stdio(false);cin.tie(0 ...
分类:
其他好文 时间:
2021-03-05 13:15:01
阅读次数:
0
如果用sort函数的话需要nlogn的时间复杂度 #include<algorithm> #include<string.h> #include<iostream> #include<stdio.h> #include<string.h> #define OFFSET 500000 int Hash ...
分类:
编程语言 时间:
2021-03-03 12:38:22
阅读次数:
0
main.cpp 1 #include <stdio.h> 2 #include "mystack.h" 3 #include <stdlib.h> 4 #include <string.h> 5 #include <windows.h> 6 using namespace std; 7 #defi ...
分类:
编程语言 时间:
2021-02-26 13:21:08
阅读次数:
0
1 #include<stdio.h> 2 #include<math.h> 3 int main() 4 { 5 long long int jiecheng(int a); 6 long long int sum=jiecheng(20); 7 printf("%lld",sum); 8 ret ...
分类:
其他好文 时间:
2021-02-24 13:27:15
阅读次数:
0
https://codeforces.com/contest/1490/problem/G 二分循环几轮,再二分哪个位置刚好够。 1 #define IO std::ios::sync_with_stdio(0),cin.tie(0),cout.tie(0); 2 #define bug(x) co ...
分类:
其他好文 时间:
2021-02-24 13:01:05
阅读次数:
0
B : 三明治 2021-01-17 14:25:53 #include<stdio.h> #include<string.h>//memset(void *s, int v, size_t n)函数的头文件 #include<limits.h>//INT_MAX的头文件 INT_MAX=21474 ...
分类:
其他好文 时间:
2021-02-24 12:53:30
阅读次数:
0
题链 #include <bits/stdc++.h> #include <iostream> #include <algorithm> #include <stdio.h> #include <string.h> #include <stdlib.h> #pragma GCC optimize(2 ...
分类:
其他好文 时间:
2021-02-22 12:36:23
阅读次数:
0
#include<stdio.h> #include<string.h> int main(void){ char ch,stro[1001],stack[1001]; int numstack[1001]; int top=-1,head=-1; /************************ ...
分类:
编程语言 时间:
2021-02-20 12:11:32
阅读次数:
0
C语言代码实现: #include <stdio.h> #include <malloc.h> #include <stdlib.h> /** 循环链表实现约瑟夫环 41个人排成一个圆圈,然后从1-3报数,报到3的人自杀,依次类推,直到剩下最后两个人可以存活下来,这两个人分别是第16个位置和第31个 ...
分类:
其他好文 时间:
2021-02-19 12:57:04
阅读次数:
0