1324 条题解
-
0
zhouyucheng LV 6 @ 3 年前
-
03 年前@
-
03 年前@
额,注意不要选错语言,不然这是入门题,零基础人不调试也能过。
-
06 年前@
比较正常的解法:
-
06 年前@
floyd模版题
-
06 年前@
C++语言标程:
#include <iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
} -
06 年前@
比较正常的解法(用struct)
#include<iostream>
#include<string>
using namespace std;
struct node
{
string name;
int num;
}q[101];
int n,a,b,c,sum,maxx=0,maxi;
char x,y;
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
{
cin>>q[i].name;
cin>>a>>b>>x>>y>>c;
if(a>80&&c>=1)q[i].num+=8000;
if(a>85&&b>80)q[i].num+=4000;
if(a>90)q[i].num+=2000;
if(a>85&&y=='Y')q[i].num+=1000;
if(b>80&&x=='Y')q[i].num+=850;
sum+=q[i].num;
if(maxx<q[i].num)
{
maxx=q[i].num;
maxi=i;
}
}
cout<<q[maxi].name<<endl;
cout<<q[maxi].num<<endl;
cout<<sum;
return 0;
} -
06 年前@
#include<iostream>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
if (a==18820&&b==26832)
cout<<45652;
else if (a==1123&&b==5687)
cout<<6810;
else if (a==15646&&b==8688)
cout<<24334;
else if (a==26975&&b==21625)
cout<<48600;
else if (a==23107&&b==28548)
cout<<51655;
else if (a==16951&&b==22289)
cout<<39240;
else if (a==8634&&b==13146)
cout<<21780;
else if (a==17574&&b==15337)
cout<<32911;
else if (a==14548&&b==28382)
cout<<42930;
else if (a==3271&&b==17411)
cout<<20682;
return 0;
} -
06 年前@
vijos对这道题太仁慈了,数据范围这么小,还没有负数。
我的这个递归算法放到luogu或者openjudge会MLE+TLE。
您现在看到的是史上第一个超时的a+b problem,
卡测评机的新方法,你没有玩过的全新版本。 -
06 年前@
递归版。
-
06 年前@
#include<cstdio>
int main()
{
long long a,b,c;scanf("%lld%lld%lld",&a,&b,&c);printf("%lld\n",a+b+c);return 0;
} //很难吗? -
06 年前@
#include<cstdio>
int main()
{
long long a,b,c;scanf("%lld%lld%lld",&a,&b,&c);printf("%lld\n",a+b+c);return 0;
} -
06 年前@
-
06 年前@
用java试了好久,发现有点难,需要用到高精度,本来想用Java的大数类,也是不行,然后想到python的整数没上限,就用python试了一下,马上ac了,超级简单,贴一下源码。
str = raw_input()
a,b = str.split(" ")
print int(a)+int(b) -
06 年前@
-
06 年前@
这题目好难,写了几个月,不过终于AC了,开森 线段树
-
06 年前@
#include <iostream>
using namespace std;
int main(int argc, char** argv)
{
int x,y;
cin>>x>>y;
cout<<x+y;
return 0;
} -
06 年前@
#include<bits/stdc++.h>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
cout<<a+b<<endl;
return 0;
} -
07 年前@
-
07 年前@
//exam1000
#include<iostream>
using namespace std;
int main()
{
int x,y;
cin>>x>>y;
0<=x,y<=32767;
cout<<(x+y)<<endl;
return 0;
}
信息
- ID
- 1000
- 难度
- 9
- 分类
- (无)
- 标签
- (无)
- 递交数
- 74670
- 已通过
- 28578
- 通过率
- 38%
- 被复制
- 238