Compile Error

/in/foo.cc: In function 'bool cmp(st, st)':
/in/foo.cc:13:33: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   13 |         return x.a>y.a||x.a==y.a&&x.b>y.b;
      |                         ~~~~~~~~^~~~~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:17:18: error: request for member 'resize' in 's', which is of non-class type 'std::vector<int> [1005]'
   17 |         cin>>n;s.resize(n);
      |                  ^~~~~~
/in/foo.cc:19:27: error: 'class std::vector<int>' has no member named 'xh'
   19 |                 cin>>s[i].xh>>s[i].a>>s[i].b;
      |                           ^~
/in/foo.cc:19:36: error: 'class std::vector<int>' has no member named 'a'; did you mean 'at'?
   19 |                 cin>>s[i].xh>>s[i].a>>s[i].b;
      |                                    ^
      |                                    at
/in/foo.cc:19:44: error: 'class std::vector<int>' has no member named 'b'
   19 |                 cin>>s[i].xh>>s[i].a>>s[i].b;
      |                                            ^
/in/foo.cc:20:16: error: request for member 'begin' in 's', which is of non-class type 'std::vector<int> [1005]'
   20 |         sort(s.begin(),s.end(),cmp);
      |                ^~~~~
/in/foo.cc:20:26: error: request for member 'end' in 's', which is of non-class type 'std::vector<int> [1005]'
   20 |         sort(s.begin(),s.end(),cmp);
      |                          ^~~
/in/foo.cc:22:28: error: 'class std::vector<int>' has no member named 'xh'
   22 |                 cout<<s[i].xh<<" "<<s[i].a<<" "<<s[i].b<<endl;
      |                            ^~
/in/foo.cc:22:42: error: 'class std::vector<int>' has no member named 'a'; did you mean 'at'?
   22 |                 cout<<s[i].xh<<" "<<s[i].a<<" "<<s[i].b<<endl;
      |                                          ^
      |                                          at
/in/foo.cc:22:55: error: 'class std::vector<int>' has no member named 'b'
   22 |                 cout<<s[i].xh<<" "<<s[i].a<<" "<<s[i].b<<endl;
      |                                                       ^

信息

递交者
类型
递交
语言
C++
递交时间
2025-02-06 13:35:36
评测时间
2025-02-06 13:35:36
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes