Submission #26928718
Source Code Expand
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <deque>
#include <algorithm>
#include <math.h>
#include <climits>
typedef long long LL;
using namespace std;
int main()
{
LL N = 0u;
cin >> N;
LL M = 0u;
cin >> M;
vector<vector<LL>> B;
for (LL i = 0; i < N; ++i)
{
vector<LL> row;
for (LL j = 0; j < M; ++j)
{
LL b = 0u;
cin >> b;
row.emplace_back(b);
}
B.emplace_back(row);
}
LL initialJ = B[0][0] % 7;
LL initialI = B[0][0] / 7 + 1;
bool isApplicable = true;
for (LL i = 0; i < N; ++i)
{
for (LL j = 0; j < M; ++j)
{
if (B[i][j] != (initialI + i - 1)*7 + initialJ + j)
{
isApplicable = false;
break;
}
}
if (!isApplicable)
{
break;
}
}
if (isApplicable)
{
cout << "Yes" << endl;
}
else
{
cout << "No" << endl;
}
}
Submission Info
| Submission Time | |
|---|---|
| Task | C - Calendar Validator |
| User | wfalps |
| Language | C++ (GCC 9.2.1) |
| Score | 0 |
| Code Size | 1131 Byte |
| Status | WA |
| Exec Time | 37 ms |
| Memory | 4260 KiB |
Judge Result
| Set Name | Sample | All | ||||||
|---|---|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 300 | ||||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt, example2.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, example0.txt, example1.txt, example2.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 35 ms | 4172 KiB |
| 001.txt | AC | 2 ms | 3628 KiB |
| 002.txt | AC | 12 ms | 3808 KiB |
| 003.txt | AC | 4 ms | 3592 KiB |
| 004.txt | AC | 13 ms | 3884 KiB |
| 005.txt | AC | 20 ms | 3936 KiB |
| 006.txt | WA | 15 ms | 3600 KiB |
| 007.txt | WA | 4 ms | 3440 KiB |
| 008.txt | AC | 6 ms | 3820 KiB |
| 009.txt | WA | 24 ms | 4056 KiB |
| 010.txt | AC | 32 ms | 4192 KiB |
| 011.txt | AC | 35 ms | 4088 KiB |
| 012.txt | WA | 37 ms | 4260 KiB |
| 013.txt | AC | 23 ms | 3884 KiB |
| 014.txt | WA | 16 ms | 3948 KiB |
| 015.txt | AC | 2 ms | 3412 KiB |
| 016.txt | AC | 2 ms | 3488 KiB |
| 017.txt | AC | 3 ms | 3596 KiB |
| 018.txt | AC | 3 ms | 3548 KiB |
| 019.txt | AC | 12 ms | 3832 KiB |
| 020.txt | AC | 32 ms | 4000 KiB |
| 021.txt | AC | 23 ms | 3884 KiB |
| 022.txt | AC | 16 ms | 3816 KiB |
| example0.txt | AC | 4 ms | 3424 KiB |
| example1.txt | AC | 2 ms | 3420 KiB |
| example2.txt | AC | 2 ms | 3600 KiB |