Pastebin
API
tools
faq
paste
Login
Sign up
SHARE
TWEET
Untitled
a guest
Jul 20th, 2018
289
0
Never
Add comment
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!
text
0.18 KB
| None
|
0
0
raw
download
clone
embed
print
report
LL dp[301][2501];
dp[0][1] = 1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < 2500; j++) {
dp[i + 1][j * a[i] % (p * q)] += dp[i][j];
}
}
LL answer = dp[n][0];
Add Comment
Please,
Sign In
to add comment
Public Pastes
Building System
Lua | 3 min ago | 12.65 KB
Sea Otter 5
Java | 7 min ago | 35.98 KB
Untitled
Python | 29 min ago | 17.36 KB
LuckyEcho HiddenDev Application
Lua | 34 min ago | 15.74 KB
Untitled
C++ | 53 min ago | 7.50 KB
webscoket
JavaScript | 1 hour ago | 1.72 KB
Login Page
JavaScript | 1 hour ago | 4.81 KB
Individaul Portal
JavaScript | 1 hour ago | 16.55 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the
Cookies Policy
.
OK, I Understand
Not a member of Pastebin yet?
Sign Up
, it unlocks many cool features!