随笔分类 - 基础题
摘要:好坑爹的一题,刚开始暴力DFS,果断超时。其实可以做一个变形,i×j+i+j可以变形为i×(j+1)+j+1=n+1;进而可以变化为(i+1)×(j+1)=n;即统计一下n%(i+1)==0可以出现多少次即可;写这一题目是在Ubuntu的codeblocks交了不下十多次吧!总是wrong!最后,不管了编译器,把long long怒改写成了__int64,ac了,无语啊!至今仍然不知道why?View Code 1 #include<stdio.h> 2 #include<math.h> 3 int main() 4 { 5 6 int t
阅读全文
摘要:Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your present's card number will b
阅读全文