码迷,mamicode.com
首页 >  
搜索关键字:int-max    ( 1549个结果
PAT B1024/A1073 科学计数法
书中AC代码 include include include include const int max_n = 10100; using namespace std; void Print(bool a) { if(!a) printf(" "); } int main() { ifdef ONL ...
分类:其他好文   时间:2019-08-10 15:47:49    阅读次数:94
PAT B1021 个位数统计 (15)
AC代码 include include include using namespace std; const int max_n = 1010; char ans[max_n]; int count[10][2] = {0}; int main() { ifdef ONLINE_JUDGE els ...
分类:其他好文   时间:2019-08-06 01:09:03    阅读次数:79
各种错误锦集
欢迎dalao补充 ^_^ CE (Compile Error)(他实在可怕,尤其是编译器不显示编译错时QAQ) (1)变量为int读入别用lld,编译给过,实测WA0; (2)会编译错误的变量名称:end,hash,fail,next,y1,ws (3)初始化数组时整体赋值,例:int a[max ...
分类:其他好文   时间:2019-08-05 21:51:05    阅读次数:132
词组缩写
#include #include #include using namespace std; int main() { const int max = 1000000; char str[max]; char num[max / 10]; stringstream ss; int n, i, j;... ...
分类:其他好文   时间:2019-08-05 13:36:49    阅读次数:112
【SPOJ】LCS2
题面 https://vjudge.net/problem/SPOJ-LCS2 题解 ...
分类:其他好文   时间:2019-07-31 22:23:39    阅读次数:114
统计a所指字符串中每个字母在字符串中出现的次数(统计时不区分大小写),并将出现次数最高的字母输出(若有多个,输出一个即可)
#include #include void fun(char a[]) { int b[26], i, n,max; for (i=0; i='a' && a[i]='A' && a[i]<='Z') b[a[i] -'A']++; max = 0; for (i=1; i<26; i++) if... ...
分类:其他好文   时间:2019-07-31 13:31:09    阅读次数:91
PAT A1011 World Cup Betting(20)
AC代码 include include const int max_n = 3; using namespace std; / struct Bet { double W, T, L }bet[3]; void init() { for(int i = 0; i T)?(W L?W:L):(T L ...
分类:其他好文   时间:2019-07-30 00:41:53    阅读次数:124
697. 数组的度 - 应该还可以优化!!!!
import java.util.Arrays ; class Solution { public int findShortestSubArray(int[] nums) { int size = nums.length; int max=-1; for(int i =0... ...
分类:编程语言   时间:2019-07-27 00:08:26    阅读次数:114
(字符串) leetcode
思路:判断各种边界条件。 1)首先过滤字符串前面的空格,即找到第一个不为空格的字符; 2)如果第一个字符是+或-,设置flag值; 3)接下来的字符如果在'0' - '9' 范围内,则转换为数字,否则结束循环; 注意上一步中,如果结果已经大于INT_MAX或小于INT_MIN,则直接返回INT_MA ...
分类:其他好文   时间:2019-07-25 23:13:49    阅读次数:113
杭电OJ2022
题目太长懒得复制了,签到题直接a了。 #include<iostream> #include<math.h> using namespace std; int main() { int m,n; while(cin>>m>>n) { int max,num=0,s,i; cin>>max; for( ...
分类:其他好文   时间:2019-07-25 00:35:45    阅读次数:87
1549条   上一页 1 ... 16 17 18 19 20 ... 155 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!