题意: 给你N个数,q组操作,操作有两种,查询和改变,查询就是查询当前的这个数上有多少,更改是给你a b k c,每次从a到b,每隔k的数更改一次,之间的数不更改,就相当于跳着更新. 思路:(别人的) (i - a) % k == 0 等价于 i % k == a % k 一共有10中情况 还有枚举所有情况中的小情况 (1)1 2 3 4 5 6 7 8 9..... (2)1 3 5 7 9 11 13 ...... 2 4 6 8…
Mayor's posters Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 43507 Accepted: 12693 Description The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral post…
敌兵布阵 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 87684 Accepted Submission(s): 36912 Problem Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了.A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务…
An easy problem A Time Limit: 2000/1000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Status N个数排成一列,Q个询问,每次询问一段区间内的数的极差是多少. Input 第一行两个整数N(1≤N≤50000),Q(1≤Q≤200000).接下来一行N个整数a1 a2 a3 ....an,(1≤ai≤1000000000).接下来Q行,每行两个整数L,R(1≤L…