2012-05-10から1日間の記事一覧

AOJ 0219 - A Popular Ice-cream Shop

aoj

オーナーはGUIが嫌いなんですね. #include <iostream> int main(){ int n; while(std::cin >> n, n){ int ice[10] = {0}; for(int i=n;i;i--){ int t; std::cin >> t; ice[t]++; } for(int i=0;i<10;i++){ if(ice[i]) for(int j=ice[i];j;j--) std::cout << "*"; else</iostream>…

AOJ 0226 - Hit and Blow

aoj

Hit&Blowの問題. コード内はBlowがBrowになってますが気にしない. ショートコーディングは辛かったのでやめました(技術の欠如) #include <iostream> int main(){ std::string a, b; while(std::cin >> a >> b, a != "0"){ int hit = 0, brow = 0, as[10] = {0}, bs</iostream>…