摘要: #include <iostream>#include <string.h>#include <vector>using namespace std; int main(){ vector<string> c; int n; cin >> n; int a, b; for(int i=0; i<n; 阅读全文
posted @ 2017-08-10 20:00 diamondDemand 阅读(451) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std; int main() { int n; cin >> n; int len=0; int p=0; char str[1001]; int m = 1; memset(str, '\0', sizeof(str)); while(true) ... 阅读全文
posted @ 2017-08-10 19:41 diamondDemand 阅读(497) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>using namespace std; int main(){ vector<char> x; int n; cin >> n; int i=0; char a[10]; a[0] = '\0'; while(a[0]!='E 阅读全文
posted @ 2017-08-10 15:35 diamondDemand 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 解题思路: a.由于借出或归还信息可能丢失,是故如果第一次就见到归还直接跳过(借出信息丢失),连续两次见到同一本书的借出第一次借出信息丢掉(第一次归还信息丢失)。 b.计算平均阅读时间,有除零错误,浮点数四舍五入(加上0.5f强制转换为int) #include <iostream>#include 阅读全文
posted @ 2017-08-10 14:57 diamondDemand 阅读(832) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { char date[11]; cin >> date; for(int i=6; i<10; i++) cout << date[i]; cout << date[5]; for(int i=0; i<5; i++) cout << date[i]; return 0; } 阅读全文
posted @ 2017-08-10 08:56 diamondDemand 阅读(255) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int main(){ int erBaiwu; int i=0; while(scanf("%d", &erBaiwu)) { i++; if(erBaiwu==250) break; } cout << i; 阅读全文
posted @ 2017-08-09 21:32 diamondDemand 阅读(128) 评论(0) 推荐(0) 编辑
摘要: #include<bits/stdc++.h>using namespace std;int main(){ int n; cin >> n; char sex[n]; double stature[n]; for(int i=0; i<n; i++) { cin >> sex[i] >> stat 阅读全文
posted @ 2017-08-09 21:28 diamondDemand 阅读(413) 评论(0) 推荐(0) 编辑
摘要: cin.getline(a, 3)只会向数组a中读进2个字符; #include <iostream>#include <stdio.h>#include <stdlib.h>#include <string.h> using namespace std; int main(){ int n; ch 阅读全文
posted @ 2017-08-09 19:55 diamondDemand 阅读(153) 评论(0) 推荐(0) 编辑
摘要: printf输出格式控制#include #include #include #include using namespace std; int main() { double a, b; cin >> a >> b; cout << a; printf("/"); if(b==0) { cout << "0=Error... 阅读全文
posted @ 2017-08-09 16:51 diamondDemand 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 姥姥出题,绝不随意,某个人的名字以.开头,我能说什么呢#include #include #include #include using namespace std; int main() { char peopleName1[11]; char peopleName2[11]; char peopleName3[11]; memset(people... 阅读全文
posted @ 2017-08-09 16:31 diamondDemand 阅读(323) 评论(0) 推荐(0) 编辑