摘要:
标准c语言#include //---------回车被第一个 gets(s) 接收char s[100]; // -----直接换行,,,,,少一行int main(int argc, char ... 阅读全文
摘要:
错误#include#include#includeusing namespace std;struct node { int a; char s[1000]; }p[1000];int cmp(node c,node b){ return c.ap[k].s[j]) p[k].a++; ... 阅读全文
摘要:
#include#include#includeusing namespace std;struct node{ int a; char s[105]; }p[105];int cmp(node c,node b){ return c.a #include #inclu... 阅读全文
摘要:
#include #include using namespace std;int main(int argc, char *argv[]){ double a,b; cin>>a; while (cin>>b) { if (b==999) { ... 阅读全文
摘要:
#include#include#include#include#include#includeusing namespace std;int main(){ int t,i,n,k; string s,ss,s1,s2; while(cin>>t) { ... 阅读全文
摘要:
#include using namespace std;int main(){ int a[51],n,k=1; while(cin>>n,n) { int i,ans=0,s=0; for(i=0;i>a[i]; s+=a[i]... 阅读全文
摘要:
#include #include using namespace std;int main(){ string n; while(cin>>n,n!="0"){ int s=0,l=n.length(); for(int i=0;i9) s=s/10+s%10; cout... 阅读全文
摘要:
#include #include using namespace std;int main(int argc, char *argv[]){ int i,n,m; string s; while(cin>>m) { while(m--) { cin>>s; n=1; if(s.si... 阅读全文
摘要:
-#include using namespace std;int main(int argc, char *argv[]){ int n,i,sum; string s; cin>>n; while(n--) { cin>>s; for(i=0,sum=1;s[i];i++) { if(... 阅读全文
摘要:
#include using namespace std;int a[1000];int f(int n){ int k=0; while(n) { a[k++]=n%2; n/=2; } return k;}int main(int argc, char *argv[]){ int n,m,... 阅读全文
摘要:
Sample input:24 1 2 3 4 5 1 2 3 4 5 Sample output: 10 15 // C语言AC代码#include int n,c,t,sum; int main() { while( s... 阅读全文
摘要:
ctrl +z 的使用#includeusing namespace std; main(){ int num,sum=0; while(cin>>num) { sum+=num; } cout u... 阅读全文
摘要:
QuicksumTime Limit: 2 Seconds Memory Limit: 65536 KBA checksum is an algorithm that scans a packet of data and returns a single number. The idea is... 阅读全文
摘要:
C语言实验四(函数):题目1、数字根时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte总提交:305 测试通过:185描述正整数的数字根是将数位上的数字求和进行计算而来。如果各位数字之和为一位的整数,那么这个整数就是这个数的数字根;如果之后为... 阅读全文
摘要:
Reverse TextTime Limit: 2 Seconds Memory Limit: 65536 KBIn most languages, text is written from left to right. However, there are other languages whe... 阅读全文
摘要:
Geometry Made SimpleTime Limit: 2 Seconds Memory Limit: 65536 KBMathematics can be so easy when you have a computer. Consider the following example. ... 阅读全文
摘要:
DNA SortingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1924Accepted Submission(s): 949Problem ... 阅读全文
摘要:
Reverse NumberTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 5052Accepted Submission(s): 2352Prob... 阅读全文
摘要:
FatMouse' TradeTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 42882Accepted Submission(s): 14310P... 阅读全文
摘要:
C++ sort函数的用法STL有个排序函数sort,可以直接对数组和向量排序。一、功能:给定区间所有元素进行排序二、头文件: #include 三、sort函数的参数:可以传两个参数或三个参数。第一个参数:要排序的区间首地址,第二个参数:区间尾地址的下一地址。也就是说,排序的区间是[a,b)。例如... 阅读全文