2011-04-11から1日間の記事一覧

SRM311 div1 medium

桁ごとに考えて足すだけ。 typedef long long LL; LL S(LL num) { num++; LL r=0; for(LL digit=0,i=10;digit<15;digit++,i*=10) { LL l=num; r+=l/i*45*(i/10); l%=i; for(LL j=0;0

SRM412 div1 medium

実装。 ”starting with the note that has the highest pitch , then the note with the second -highest pitch , and so on .” この文を見逃したので時間がかかった。 #include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; class StringsAndTabs </vector></string></iostream></algorithm>…