0w1

Entries from 2016-04-11 to 1 day

初次Python 暴力解益智遊戲

Brain Word Puzzle - Google Play の Android アプリ WordBrain on the App Store 這是一個文字遊戲,前面的關卡都是一個 4 * 3 的矩陣,每個格子裡有一個字母。會給兩個長度,相加等於 12,第一次操作要選擇一個字母當起點,然後移動到尚未拜訪的周圍八格其…

GCJ 2016 QR C. Coin Jam ( Ad hoc )

Dashboard - Qualification Round 2016 - Google Code Jam There are several solutions, and mine is of the easier one. Since the input is fixed, 16 and 32, observing that both of them are even numbers, we will come up to that, given any number…

GCJ 2016 QR B. Revenge of the Pancakes ( Greedy )

Dashboard - Qualification Round 2016 - Google Code Jam This can be solved by DP, too. However the greedy approach is easy to come up with and shorter in code. With some observation, it is easy to find that the flips will be made from left …

GCJ 2016 QR A. Counting Sheep ( Brute Force )

Dashboard - Qualification Round 2016 - Google Code Jam It just feels like it will definitely finish before 20000 times, if solution exists. #include <bits/stdc++.h> using namespace std; const int MAXN = 1e6 + 6; typedef long long ll; ll n; void solve(){ </bits/stdc++.h>…