1808 Problem C
#include <fstream>
#include <string>
using namespace std;
const int maxn = 1024;
int main()
{
string sho,str,ans;
cin>>sho;
while(getline(cin,str))
{
for(int i=0;i<str.size();i++)
{
int j=0;
for(;str[i+j]!=0&&sho[j]!=0;j++)
{
if(str[i+j]!=sho[j])
break;
}
if(sho[j]==0)//跳過符合字符串
else if(str[i]!=‘ ‘)
ans+=str[i];
}
cout<<ans;
}
return 0;
}
1808 Problem C
相關推薦
1808 Problem C
amp cin main get name string sin ret namespace #include <iostream>#include <fstream>#include <string>using namespace st
【二分】Urozero Autumn Training Camp 2016 Day 5: NWERC-2016 Problem C. Careful Ascent
ret mes printf %d esp n+1 ++ for d+ 二分Vx即可。 #include<cstdio> #include<algorithm> using namespace std; #define EPS 0.00000000
Codeforces Round #427 (Div. 2) Problem C Star sky (Codeforces 835C) - 前綴和
題目 scan 開心 color 一個 lin cond cati ict The Cartesian coordinate system is set in the sky. There you can see n stars, the i-th has coordi
Problem C: 機器翻譯【stl-隊列】
size enter stl 當前 ron 沒有 原理 fstream long Problem C: 機器翻譯 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 54 Solved: 27[Submit][Status]
Codeforces Round #436 (Div. 2), problem: (C) Bus
cst lag () turn code span cpp urn print #include <cstdio> int main(){ long long a,b,f,k,i,tot,s[11000],cnt; scanf("%lld%lld%lld%l
Codeforces Round #439 (Div. 2) Problem C (Codeforces 869C) - 組合數學
note als 9.png fig fine 連接 time mod reac — This is not playing but duty as allies of justice, Nii-chan! — Not allies but j
fjnu2016-2017 低程 PROBLEM C 汪老司機
() int long ace end return 方程 動態 win 動態規劃 方程 #include <iostream>#include <iomanip>#include <cmath>#include <algorith
#452 Div2 Problem C Dividing the numbers ( 思維 || 構造 )
tin ros family 過程 clas num microsoft splay 選擇 題意 : 將從 1 ~ n 的數分成兩組,要求兩組和的差值盡可能小,並輸出其中一組的具體選數情況 分析 : 如果將這 n 個數從大到小四個一組來進行選擇的話那麽差值就為 0 ,然
BZOJ2302 [HAOI2011]Problem c 【dp】
red 多少 void ons sum ems () \n 直接 題目 給n個人安排座位,先給每個人一個1~n的編號,設第i個人的編號為ai(不同人的編號可以相同),接著從第一個人開始,大家依次入座,第i個人來了以後嘗試坐到ai,如果ai被占據了,就嘗試ai+1,ai+1也
Problem C: 從點到面
limit hint 出現 pac 屬性 code get 構造函數、析構函數 拷貝構造函數 Problem C: 從點到面 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 3317 Solved: 1854[Subm
Problem C: 質心算法
enter 測試用例 運算符 構造函數的調用 平均值 mst 對象 light 另一個 Problem C: 質心算法 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 2799 Solved: 1290[Submit][St
Problem C: STL——括號匹配
hint href tac mit emp for content CP ask Problem C: STL——括號匹配 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 4075 Solved: 2532[Submi
Problem C: 成績排序
out pro std mit strcmp 第一個 ostream mes gre Problem C: 成績排序 Time Limit: 1 Sec Memory Limit: 128 MBSubmit: 2535 Solved: 1988[Submit][
【二分答案】Problem C:木材加工
+= spa 都是 space amp 表示 put 兩個 ret Problem C:木材加工 Time Limit:1000MS Memory Limit:65536K Total Submit:48 Accepted:20 Description 【問題描述】
[8月4日衢州二中] problem C
scan c++ fine nbsp 序列 stat 分塊 ble 依次 題目描述 給出兩個序列{a[i]}、{b[i]},一個排列 p 的權值定義為∑a[i]*b[p[i]]。 一開始有一個排列 P 作為限制,表示任意與 P 有某一位相同的排列均不合法。
HDU-5687-Problem C
all bsp using null name ret ++ n) free #include"bits/stdc++.h" using namespace std; struct tree{ tree* Next[26]; int cnt; }*root
$Self~Problem~C~:~Samsara$
deb 只需要 bool file man ring 不可 line 其它 題目背景: 在這個\(Canman\)界的人都知道,世界上最偉大的修道者 —— \(Felling\),曾經結束了\(Canman\)的無垠盞之災,守護了\(Canman\)的和平。在無垠盞之災的最
Problem C: 呼叫函式,求a+aa+aaa+....+aa...aa(n個a)
#include <stdio.h> int fn(int a,int n)//定義函式 { int i,s,m=0; for(i=1;i<=n;i++) { m=m+a;//當a=3時,m=3,然後a=30,m=33; a=
Gym 101194C / UVALive 7899 - Mr. Panda and Strips - [set][2016 EC-Final Problem C]
題目連結: http://codeforces.com/gym/101194/attachments https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem
Problem C. Matrix Cutting Google Kickstart Round G 2017
題意:給定一個M*N矩陣,需要按照橫縱軸cut得到M*N個1*1的submatric,每次cut一次得到的coin是矩陣中最小數的值。求最優解是的得到的coin數最大。 small input是一個vector,可以列舉分割的行數。large input想法類似,只不過改成dp,dp[a,b