QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#219693#6389. TopicalHuangHanShengCompile Error//C++14949b2023-10-19 17:32:002023-10-19 17:32:01

Details

answer.code: In function ‘int main()’:
answer.code:22:25: error: ‘d’ was not declared in this scope
   22 |                         d++;
      |                         ^
answer.code:23:28: error: ‘a’ was not declared in this scope
   23 |                         if(a[j]){
      |                            ^
answer.code:33:25: error: ‘a’ was not declared in this scope
   33 |                         a[j]=d;
      |                         ^
answer.code:38:23: error: no match for ‘operator[]’ (operand types are ‘std::set<std::pair<int, int> >’ and ‘int’)
   38 |                 cin>>s[i];
      |                       ^
answer.code: In lambda function:
answer.code:41:48: error: no match for ‘operator[]’ (operand types are ‘std::set<std::pair<int, int> >’ and ‘int’)
   41 |         sort(h+1,h+q+1,[](int x,int y){return s[x]<s[y];});
      |                                                ^
answer.code:41:53: error: no match for ‘operator[]’ (operand types are ‘std::set<std::pair<int, int> >’ and ‘int’)
   41 |         sort(h+1,h+q+1,[](int x,int y){return s[x]<s[y];});
      |                                                     ^
answer.code: In function ‘int main()’:
answer.code:43:48: error: no match for ‘operator[]’ (operand types are ‘std::set<std::pair<int, int> >’ and ‘int’)
   43 |                 for(;p.size()&&p.top().first<=s[h[i]];ans[0]-=p.top().second,p.pop()){
      |                                                ^
answer.code:15:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   15 |         freopen("inspect.in","r",stdin);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
answer.code:16:16: warning: ignoring return value of ‘FILE* freopen(const char*, const char*, FILE*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   16 |         freopen("inspect.out","w",stdout);
      |         ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~