Bob watches TV every day. He always sets the volume of his TV to bb. However, today he is angry to find out someone has changed the volume to aa. Of course, Bob has a remote control that can change the volume. There are six buttons (−5,−2,−1,+1,+2,+5…
好吧,其实我拿到这个题的时候,首先想到了bfs,写完之后,开开森森的去交代码,却在第二个数据就TEL,然后优化半天,还是不行. 最终,我盯着1,2,5发呆半天,wc,然后直接贪心 #include<iostream> using namespace std; int main() { int T; cin>>T; while(T--) { int a,b; cin>>a>>b; int x = abs(a - b); ; x %= ; ans += x /…
http://www.foundationsofgameenginedev.com/ Chapter1 Vectors and Matrices (已看) Chapter2 Transforms (已看) Chapter3 Geometry Chapter4 Adavanced Algebra Chapter1 Vectors and Matrices 1.1 Vector Fundamentals A scalar is a quantity such as distance,mass,or…