Time Limit: 2 sec / Memory Limit: 1024 MB Score : 600600 points Problem Statement Snuke has a blackboard and a set SS consisting of NN integers. The ii-th element in SS is SiSi. He wrote an integer XX on the blackboard, then performed the following o…
链接:https://ac.nowcoder.com/acm/contest/897/L 来源:牛客网 XOR 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 32768K,其他语言65536K 64bit IO Format: %lld 题目描述 Exclusive or is a logical operation that outputs true only when inputs differ(one is true, the other is false). It is…
题意:给你三个数A,B,C 现在要你找到满足 A and B >C 或者 A 异或 B < C 的对数. 思路:我们可以走对立面 把既满足 A and B <= C 也满足 A 异或 B >= C的个数用数位dp统计出来 最后用A*B减去即可 #include <bits/stdc++.h> using namespace std; const double pi = acos(-1.0); const int N = 1e6+7; const int inf = 0…
Matches Puzzle Game Problem Description As an exciting puzzle game for kids and girlfriends, the Matches Puzzle Game asks the player to find the number of possible equations A−B=C with exactly n (5≤n≤500) matches (or sticks).In these equations, A,B a…
D. Roman and Numbers time limit per test 4 seconds memory limit per test 512 megabytes input standard input output standard output Roman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change h…
You are given two integers l l and r r (l≤r l≤r ). Your task is to calculate the sum of numbers from l l to r r (including l l and r r ) such that each number contains at most k k different digits, and print this sum modulo 998244353 998244353 . For…
题目链接: http://codeforces.com/problemset/problem/258/B B. Little Elephant and Elections time limit per test2 secondsmemory limit per test256 megabytes 问题描述 There have recently been elections in the zoo. Overall there were 7 main political parties: one…
D. Magic Numbers 题目连接: http://www.codeforces.com/contest/628/problem/D Description Consider the decimal presentation of an integer. Let's call a number d-magic if digit d appears in decimal presentation of the number on even positions and nowhere els…
传送门 D. The Maths Lecture time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher…
King's Order Accepts: 381 Submissions: 1361 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description After the king's speech , everyone is encouraged. But the war is not over. The king needs to give orders…
思路:数位$DP$ 提交:5次(其实之前A过,但是调了调当初的程序.本次是2次AC的) 题解: 我们分别求出$sum(x)=i$,对于一个$i$,有几个$x$,然后我们就可以快速幂解决. 至于求个数用数位$DP$就好了. #include<cstdio> #include<iostream> #include<cstring> #define ull unsigned long long #define ll long long #define R register l…
Problem Description As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has an array A of length n,and the ith element of A is equal to the sum of all dig…