제출 #381888

#제출 시각아이디문제언어결과실행 시간메모리
381888SlavitaVepar (COCI21_vepar)C++14
0 / 70
3 ms492 KiB
#include <bits/stdc++.h>
#define ve vector<int>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define pi pair<int,int>
#define all(v) v.begin(),v.end()
#define si(v) (int)v.size()
#define en '\n'
using namespace std;
typedef long long ll;
typedef unsigned long long ull;

const int N = 1e4 + 228;
const int big = 1e9;
int n;
//ull fa[N];

int main(){
    iostream::sync_with_stdio(false); cin.tie(0); ios_base::sync_with_stdio(false); cout.tie(0);
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    cin >> n;
    //fa[1] = 1ll;
    //for (int i = 2; i <= 20; i++) fa[i] = fa[i - 1] * 1ll * i;

    for (int i = 1; i <= n; i++){
        ull l1, r1, l2, r2;
        cin >> l1 >> r1 >> l2 >> r2;
        ull sm1 = 1ll;
        ull sm2 = 1ll;
        for (int j = l1; j <= r1; j++) sm1 *= 1ll * j;
        for (int j = l2; j <= r2; j++) sm2 = 1ll * (sm2 * j) % sm1;
        if (sm2 == 0ll) cout << "DA\n"; else cout << "NE\n";
    }
    return 0;
}

컴파일 시 표준 에러 (stderr) 메시지

Main.cpp: In function 'int main()':
Main.cpp:33:28: warning: comparison of integer expressions of different signedness: 'int' and 'ull' {aka 'long long unsigned int'} [-Wsign-compare]
   33 |         for (int j = l1; j <= r1; j++) sm1 *= 1ll * j;
      |                          ~~^~~~~
Main.cpp:34:28: warning: comparison of integer expressions of different signedness: 'int' and 'ull' {aka 'long long unsigned int'} [-Wsign-compare]
   34 |         for (int j = l2; j <= r2; j++) sm2 = 1ll * (sm2 * j) % sm1;
      |                          ~~^~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...