よじろめ覚書

私の理解度重視のソースコードです。

2019-08-08から1日間の記事一覧

ABC051A - Haiku

ABC

問題:A - Haiku #include <iostream> #include <string> using namespace std; int main(void) { string s; cin.tie(0); ios::sync_with_stdio(false); cin >> s; cout << s.substr(0, 5) << " " << s.substr(5 + 1, 7) << " " << s.substr((5 + 1) + (7 + 1), 5) << "\n"; re</string></iostream>…

ABC050B - Contest with Drinks Easy

ABC

問題:B - Contest with Drinks Easy #include <iostream> using namespace std; #define REP(i, n) for(int i = 0; i < (n); ++i) int main(void){ int n, t[100], m, p, x, sum = 0; cin.tie(0); ios::sync_with_stdio(false); cin >> n; REP(i, n) { cin >> t[i]; s</iostream>…