I am trying to solve A. Way Too Long Words in C# (I already have a solution in c++). https://codeforces.com/problemset/problem/71/A I used the example given in the problem section in order to check my code. If I input n = 1 and check each string individually, I get correct an...
A. Way Too Long Words http://codeforces.com/problemset/problem/71/A time limit per test memory limit per test input output localization" or "internationalization" are so long that writing them many times in one text is quite tiresome. too long, if its length is strictly more than 10 This...
题目链接:http://codeforces.com/problemset/problem/71/A 题目大意:给出n个单词,每个字母数多于10的都视为过长单词,否则视为短单词,长单词输出格式为第一个字母+单词不算第一个和最后一个字母中间的字母数目+最后一个字母 直接模拟即可,因为多于10才进行变形
Codeforces Round #771 (Div. 2) C(单调栈/贪心) D(BFS) E(线段树/延迟操作) 严格鸽 Codeforces Round 996 (Div. 2) A - D 2055A - Two Frogs#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { int t; cin >> t; while (t--) { int...
codeforces 71A - Way Too Long Words #include<stdio.h> #include<string.h> int main() { int i,n,len; char a[1000]; scanf("%d",&n);getchar(); for(i=0;i<n;i++) { gets(a); if(strlen(a)>10) printf("%c%d%c\n",a[0],strlen(a)-2,a[strlen(a)-1]); else puts(a)...
I used my own template of lazy propagation. But, after coding the solution to the problem, I realized that the compilation of the source file was taking too much time on my laptop. So, I tried to use the custom invocation feature of codeforces. But amazingly, to my surprise, I got a...
Codeforces 71A Way Too Long Words 题目链接 http://codeforces.com/problemset/problem/71/A #include<iostream> #include<string> using namespace std; int main() { int n; cin>>n; while(n--) { string str; cin>>str; int len=str.length(); if(len<=10) { cout<<str<<endl; }else {...
Codeforces 71A - Way Too Long Words 题目: A. Way Too Long Words time limit per test: 1 second memory limit per test: 256 megabytes input: standard input output:standard output Sometimes some words like “localization” or “internationalization” are so long that writing them many times in ...
codeforces水题100道 第二十一题 Codeforces Beta Round #65 (Div. 2) A. Way Too Long Words (strings) 题目链接:http://www.codeforces.com/problemset/problem/71/A 题意:将长字符串改成简写格式。 C++代码: C++