2010-09-22から1日間の記事一覧

AOJ 0057 The Number of Area

404 Not Found #include <cstdio> int main() { int n; while(~scanf("%d\n", &n)) printf("%d\n", (n * n + n + 2) / 2); return 0; } just implemented a formula that I found on the internet</cstdio>

AOJ 0074 Videotape

404 Not Found #include <cstdio> int main() { int l, m, n; while(~scanf("%d %d %d", &l, &m, &n), ~l && ~m && ~n){ long long total = l * 60LL * 60 + m * 60 + n, remaining = 120 * 60 - total; printf("%02lld:%02lld:%02lld\n", remaining / 60 / 60, rema</cstdio>…

AOJ 0071 Bombs Chain

404 Not Found #include <cstdio> #include <vector> #include <queue> using namespace std; typedef struct {int x, y;} p; char m[8][9]; inline bool valid(int n){return 0 <= n && n < 8;} inline void addqueue(queue<p>& q, int x, int y){ if(valid(x) && valid(y)) if(m[y][x</p></queue></vector></cstdio>…