sc_lui95 @ 2024-04-21 20:32:27
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
int main()
{
char data[101];
string receive;
string output[13];
int currstorage = 0;
bool skip = false;
int currentCount = 0;
cin >> data;
int len = strlen(data);
for (int i = 0; i < len; ++i)
{
if (skip)
{
if (data[i] == ',')
{
currentCount = 0;
skip = false;
}
continue;
}
if (data[i]==','||i+1==len)
{
if (currentCount < 6)
{
currentCount = 0;
receive.clear();
continue;
}
else
{
output[currstorage] = receive;
currstorage++;
currentCount = 0;
receive.clear();
continue;
}
}
if (currentCount == 12 && data[i] != ',')
{
receive.clear();
skip = true;
}
if ((data[i] >= 'A' && data[i] <= 'Z') || (data[i] >= 'a' && data[i] <= 'z') ||
(data[i] >= '0' && data[i] <= '9') || data[i] == '!' || data[i] == '@' || data[i] == '#' || data[i] == '$')
{
receive += data[i];
currentCount++;
}
else
{
receive.clear();
skip = true;
}
}
for (int i = 0; i < currstorage; ++i)
{
cout << output[i];
if(i!=currstorage)
cout<< endl;
}
}
by Hydrogen_H @ 2024-05-10 21:05:54
#include<bits/stdc++.h>
using namespace std;
int main()
{
cout<<"怎么这么复杂啊???";
return 0;
}
自己去看。