nerikosans / ut-ist-coding-exam Goto Github PK
View Code? Open in Web Editor NEW東京大学大学院 創造情報学専攻 プログラミング試験 自分の解答集
東京大学大学院 創造情報学専攻 プログラミング試験 自分の解答集
for y in range(int(cell_count / width)):
if not image.get_cell((y+1) * width - 1).is_white():
success = False
break
ここで右端が白一色であることの判定を行っています、これだと正しい長さ以外のものも出力されてしまいます。(e.g. width = 100で成功する場合は width = 200において**に白い線が入るが成功になる。)
問題文が上から下への白い線が1つのみが成功の場合であることを考えるとこれは誤りになります。
修正としては最も最初に正解が見つかったタイミングで探索を打ち切れば良さそうです。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.