C++競プロ学習日記(仮)

( 学習記録であり解説Blogではないです )

Codeforces

Round#91 A. Lucky Division|Codeforces

Problem - 122A - Codeforcesを解きました。 #include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; bool check( int N ){ string S = to_string( N ); REP( i, (int</bits/stdc++.h>…

Round #298 A-Exam|Codeforces

Codeforces Round #298 A-Exam を解きました。 #include <bits/stdc++.h> #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; struct CWW{CWW(){ios::sync_with_stdio(false);cin.tie(0);}}cww; int main() { int N; cin >> N; if( N <= 2 ) { cout << 1 <</bits/stdc++.h>…

Round #326 A. Duff and Meat|Codeforces

Problem - A - Codeforces を解きました。 ktnさんに適度な問題をいくつかpick upして頂いたのですがそのうちの1問です。 (適度な問題:私のレベルに対しての適度)Duffちゃんが必要な肉の量/day と コスト/day がN日分与えられるので、 必要な肉を買う最小コ…

Round #130 A. Dubstep|Codeforces

Problem - 208A - Codeforcesを解きました。 #include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); string S; cin >> S; S = "WUB" + S + "WUB"; regex re( "(WUB)+" ); S = regex_replace( S, re, " " ); cout << S.subs</bits/stdc++.h>…

Round #89 A. String Task|Codeforces

Problem - A - Codeforcesを解きました。 #include <bits/stdc++.h> using namespace std; string f( string S ) { string res; for( auto&& x : S ) { //★ if( string( "oayeui" ).find( x ) != string::npos ) { continue; } res += x; } return res; } int main() { cin.</bits/stdc++.h>…

#65 A. Way Too Long Words|Codeforces

Codeforces Round #65 Problem - A - Codeforcesを解きました。 #include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) #define REP2(i,x,n) for(int i=x; i<(n); i++) using namespace std; int main () { cin.tie(0); ios::sync_with_stdio(false); int N;</bits/stdc++.h>…

Codeforces Round #333 (Div. 2)-A

またCodeforces誘われた(なぜ(本当なぜcodeforces.comA問題だけ見て寝ようと思って問題を読んだら... 2進法、3進法、16進法が出て来てて...そもそも知識として余り無く、 解法全く解らなかったので、未解決フラグ立てて残しておきます。n進法の実装など今の…

初CODE FORCES

先日初めてCODE FORCESに登録してみました!(参加ではない)div2のA問題なら解けるのでは?と前々から色々な人に言われていたのですが、 過去問をいくつか見ても解ける気がせず...先延ばしにしていた。 でもその日もお誘い頂いたので問題だけ覗いてみようと思…