首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
1576684866
2024年3月22日 16:55
统计单词 题解:n诺风格解法
P1394
回复 0
|
赞 4
|
浏览 995
#include <cstdio> using namespace std; #include <string.h> #include <iostream> #include <stdlib.h> int main() { char s[105]; gets(s); int sl = strlen(s); int cnt = 0; f...
CGaaraY
2024年3月16日 21:44
统计单词 题解:根据题意直接统计就行,很简单,不知道为啥大家通过率这么
P1394
回复 0
|
赞 4
|
浏览 1.1k
vector是多余的,忽略掉就好 #include <iostream> #include <string> #include <vector> using namespace std; int main() { string str; getline(cin, str); int count = 0; vector<int> nums; for (int i = 0; i < str.size(); i++) { if (str[i] ...
张会老儿
2024年3月14日 20:33
统计单词 题解:有没有大佬看看,一直是百分之%80,求求了
P1394
回复 1
|
赞 5
|
浏览 1.3k
#include<stdio.h> #include<stdlib.h> #include<string.h> int letter(char c){ //判断是否是字母 if( c>='a' && c<='z' ){ return 1; } if( c>='A' && c<='Z' ){ return 2; } ...
easymoney
2024年3月13日 13:54
统计单词 题解:(瞎猫碰上死耗子)
P1394
回复 0
|
赞 0
|
浏览 903
#include <stdio.h> #include <string.h> int main() { char c[100]; gets(c); int count = 0, word[100] = { 0 }; for (int i = 0;c[i] != '.';i++) { if (c[i] = ...
Cookie‘s AE86
2024年3月13日 10:45
统计单词 题解:
P1394
回复 0
|
赞 0
|
浏览 840
#include<bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); int slen = s.size(); int wlen = 0; int pre = 1; //1表示前一个字符是字母,0表示后一个字符是非字母 for(int ...
huanghu
2024年3月13日 07:50
统计单词 题解:
P1394
回复 0
|
赞 1
|
浏览 874
#include<stdio.h> #include<iostream> #include<string> using namespace std; int main(){ string str; while(getline(cin,str,'.')){ int len = str.length(); int count = 0; for(int i = 0; i<len; i++){ if(str[i]!=' ' &&am...
zx142407789
2024年3月12日 13:43
统计单词 题解:求助:指正错误,错因超时
P1394
回复 2
|
赞 0
|
浏览 815
#include<stdio.h> #include<stdlib.h> int main() { char ch; int count, length ; while((ch = getchar()) != EOF){ char* s = (char*)malloc(sizeof(char)*1000); count = 0; length = 0; while (ch != '\n'){ s[length++] = ch; ch = getchar(); } s[length] = '\0...
damowanghwj
2024年3月11日 19:40
统计单词 题解:欢迎各位佬指正(已ac)
P1394
回复 0
|
赞 0
|
浏览 650
#include <cstdio> #include<cstring> #include<iostream> #include<algorithm> using namespace std; int main(){ string str; getline(cin,str); int len = str.length(); // int posEng = 0; // int posOth = 0; int begin = 0; if(str[0...
许仙大大x
2024年3月11日 17:13
统计单词 题解:我愿意称之为最简单的算法
P1394
回复 0
|
赞 2
|
浏览 763
#include<iostream> #include<string> using namespace std; int main(){ string str; getline(cin,str); int count=0; for(int i=0;i<str.size();i++){ if((str[i]==' '&&str[i+1]!=...
18237466773
2024年3月9日 13:38
统计单词 题解:通过率只有80%,求大佬指点一下哪里错了
P1394
回复 2
|
赞 1
|
浏览 798
#include<stdio.h> #include<string.h> int main(){ char string[105]; while(gets(string)){ int cnt=0; //用于记录是否是遇到的收个空格 int ...
1
2
3
4
5
题目
统计单词
题解数量
41
发布题解
在线答疑
热门题解
1
纯纯逆天测试例(‘.'前有可能是空格)
2
统计单词 题解:写出这么简单的代码也是神人了
3
统计单词 题解:
4
统计单词(C++) 题解:
5
统计单词 题解:可过,判断条件很简单
6
统计单词 题解:
7
统计单词 题解:测试用例只有一个坑,别的很基本
8
就挺离谱的。。
9
统计单词 题解:
10
统计单词 题解: