Submission #74644204


Source Code Expand

#include <bits/stdc++.h>
using ull = unsigned long long int;
using ll = long long int;
using lll = __int128;
using namespace std;
const int mod = 1e9 + 7;
int d[4][2] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
inline string sread() {
    string s;
    char ch = getchar();
    // 跳过空白字符
    while (ch == ' ' || ch == '\n' || ch == '\r') ch = getchar();
    // 读取非空白字符
    while (ch != ' ' && ch != '\n' && ch != '\r' && ch != EOF) {
        s += ch;
        ch = getchar();
    }
    return s;
}
ll read(){
    ll k = 0,f = 1;
    char c = getchar();
    while(c < '0' || c > '9')
    {
        if(c == '-')f = -1;
        c = getchar();
    }
    while(c >= '0' && c <= '9')k = k * 10 + c - '0',c = getchar();
    return k * f; // 别忘记标记的负数要乘进去
}
// 调用时用 n = in();
void print(ll x){
    if(x < 0)putchar('-'),x = -x;
    if(x < 10)putchar(x + '0');
    else print(x / 10),putchar(x % 10 + '0');
}
// 直接调用 out(n) 就行了
ll ksm(ll base, ll e){
    ll res = 1;
    while(e){
        if(e & 1){
            res = res * base % mod;
        }
        base = base * base % mod;
        e >>= 1;
    }
    return res;
}//ksm板子
vector<vector<ll>> matrix_mul (vector<vector<ll>>& a, vector<vector<ll>>& b) {
    int l1 = a.size(), l2 = b[0].size();
    vector<vector<ll>>res(l1, vector<ll>(l2, 0));
    for(int i = 0; i < l1; i++){
        for(int k = 0; k < a[0].size(); k++){
            if(a[i][k]){
                for(int j = 0; j < l2; j++){
                    res[i][j] = (res[i][j] + a[i][k] * b[k][j]);
                }
            }
        }
    }
    return res;
}// 矩阵a * 矩阵b(矩阵乘法)
void Solve(){
    int m = read(), d = read();
    if((m == 1 && d == 7) || (m == 3 && d == 3) || (m == 5 && d == 5) || (m == 7 && d == 7) || (m == 9 && d == 9)){
        cout << "Yes";
    }
    else{
        cout << "No";
    }
}
signed main(){
    int T = 1;
    while(T--){
        Solve();
    }
    return 0;
}

Submission Info

Submission Time
Task A - Gothec
User wmxw
Language C++23 (GCC 15.2.0)
Score 100
Code Size 2063 Byte
Status AC
Exec Time 1 ms
Memory 3608 KiB

Compile Error

./Main.cpp: In function 'std::vector<std::vector<long long int> > matrix_mul(std::vector<std::vector<long long int> >&, std::vector<std::vector<long long int> >&)':
./Main.cpp:53:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
   53 |         for(int k = 0; k < a[0].size(); k++){
      |                        ~~^~~~~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status
AC × 4
AC × 17
Set Name Test Cases
Sample 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 00-sample-04.txt
All 00-sample-01.txt, 00-sample-02.txt, 00-sample-03.txt, 00-sample-04.txt, 01-01.txt, 01-02.txt, 01-03.txt, 01-04.txt, 01-05.txt, 01-06.txt, 01-07.txt, 01-08.txt, 01-09.txt, 01-10.txt, 01-11.txt, 01-12.txt, 01-13.txt
Case Name Status Exec Time Memory
00-sample-01.txt AC 1 ms 3484 KiB
00-sample-02.txt AC 1 ms 3544 KiB
00-sample-03.txt AC 1 ms 3544 KiB
00-sample-04.txt AC 1 ms 3376 KiB
01-01.txt AC 1 ms 3580 KiB
01-02.txt AC 1 ms 3424 KiB
01-03.txt AC 1 ms 3424 KiB
01-04.txt AC 1 ms 3432 KiB
01-05.txt AC 1 ms 3608 KiB
01-06.txt AC 1 ms 3580 KiB
01-07.txt AC 1 ms 3456 KiB
01-08.txt AC 1 ms 3504 KiB
01-09.txt AC 1 ms 3580 KiB
01-10.txt AC 1 ms 3432 KiB
01-11.txt AC 1 ms 3432 KiB
01-12.txt AC 1 ms 3548 KiB
01-13.txt AC 1 ms 3508 KiB