Submission #2700788
Source Code Expand
#include <iostream> using namespace std; int main() { int N, A, B, K; cin >> N >> A >> B >> K; int gp = A + B; int sum = 0; for (int i = 0; i <= N; i++) { for (int j = 0; j <= N - i; j++) { for (int k = 0; k <= N - i - j; k++) { int point = A * i + B * j + gp * k; if (point == K) { sum++; } } } } cout << sum / 998244353 << endl; }
Submission Info
Submission Time | |
---|---|
Task | B - RGB Coloring |
User | asamasa612 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 432 Byte |
Status | WA |
Exec Time | 2103 ms |
Memory | 256 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 700 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample01.txt, sample02.txt, sample03.txt |
All | sample01.txt, sample02.txt, sample03.txt, in01.txt, in02.txt, in03.txt, in04.txt, in05.txt, in06.txt, in07.txt, in08.txt, in09.txt, in10.txt, in11.txt, in12.txt, in13.txt, in14.txt, in15.txt, in16.txt, in17.txt, in18.txt, in19.txt, in20.txt, in21.txt, sample01.txt, sample02.txt, sample03.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in01.txt | TLE | 2103 ms | 256 KB |
in02.txt | TLE | 2103 ms | 256 KB |
in03.txt | TLE | 2103 ms | 256 KB |
in04.txt | TLE | 2103 ms | 256 KB |
in05.txt | TLE | 2103 ms | 256 KB |
in06.txt | TLE | 2103 ms | 256 KB |
in07.txt | TLE | 2103 ms | 256 KB |
in08.txt | TLE | 2103 ms | 256 KB |
in09.txt | TLE | 2103 ms | 256 KB |
in10.txt | TLE | 2103 ms | 256 KB |
in11.txt | TLE | 2103 ms | 256 KB |
in12.txt | TLE | 2103 ms | 256 KB |
in13.txt | TLE | 2103 ms | 256 KB |
in14.txt | TLE | 2103 ms | 256 KB |
in15.txt | TLE | 2103 ms | 256 KB |
in16.txt | TLE | 2103 ms | 256 KB |
in17.txt | TLE | 2103 ms | 256 KB |
in18.txt | TLE | 2103 ms | 256 KB |
in19.txt | TLE | 2103 ms | 256 KB |
in20.txt | TLE | 2103 ms | 256 KB |
in21.txt | WA | 1 ms | 256 KB |
sample01.txt | WA | 1 ms | 256 KB |
sample02.txt | WA | 1 ms | 256 KB |
sample03.txt | TLE | 2103 ms | 256 KB |