제출 #199606

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
1996062020-02-02 08:15:26Ruxandra985Restore Array (RMI19_restore)C++14
100 / 100
111 ms116448 KiB
#include <bits/stdc++.h>
#define DIMN 5010
#define DIMM 10010
using namespace std;
vector <pair <int , pair <int,int> > > v[DIMN];
int inq[DIMN], sir[DIMN];
deque <int> q;
pair <int,int> sol[DIMN];
pair <int,int> pos[DIMN][DIMN];
int main()
{
FILE *fin = stdin;
FILE *fout = stdout;
int n , m , i , l , r , k , val , nod , vecin , mini , maxi , j , poz;
fscanf (fin,"%d%d",&n,&m);
for ( i = 1 ; i <= m ; i++ ){
fscanf (fin,"%d%d%d%d",&l,&r,&k,&val);
l++;
r++;
if (val == 1){
mini = (r - (l + k - 1) + 1);
maxi = (r - l + 1);
}
else {
mini = 0;
maxi = (r - l + 1 - k);
}
///mini si maxi = cate 1 uri ar putea fi in intervalul i
v[l-1].push_back(make_pair (r , make_pair(mini , maxi)));
v[r].push_back(make_pair (l-1 , make_pair(mini , maxi)));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

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

restore.cpp: In function 'int main()':
restore.cpp:45:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         for (i = 0 ; i < v[nod].size() ; i++){
                      ~~^~~~~~~~~~~~~~~
restore.cpp:15:12: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     fscanf (fin,"%d%d",&n,&m);
     ~~~~~~~^~~~~~~~~~~~~~~~~~
restore.cpp:17:16: warning: ignoring return value of 'int fscanf(FILE*, const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
         fscanf (fin,"%d%d%d%d",&l,&r,&k,&val);
         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...