QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#807749#8813. Records in Chichén ItzáSharky#Compile Error//C++14373b2024-12-10 11:05:562024-12-10 11:06:27

Judging History

你现在查看的是最新测评结果

  • [2024-12-10 11:06:27]
  • 评测
  • [2024-12-10 11:05:56]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;

void solve() {
    int n;
    cin>>n;
    set<ll>st;
    for(int i=1;i<=n;i++){
        ll k;
        cin>>k;
        st.insert(k);
    }
    if(st.size()>=3) cout<<"Yes\n";
    else cout<<"No\n";
}

int main() {
    ios::sync_with_stdio(0); cin.tie(0);
    int t;
    cin >> t;
    while (t--) solve();
}

详细

answer.code: In function ‘void solve()’:
answer.code:7:9: error: ‘ll’ was not declared in this scope
    7 |     set<ll>st;
      |         ^~
answer.code:7:11: error: template argument 1 is invalid
    7 |     set<ll>st;
      |           ^
answer.code:7:11: error: template argument 2 is invalid
answer.code:7:11: error: template argument 3 is invalid
answer.code:9:11: error: expected ‘;’ before ‘k’
    9 |         ll k;
      |           ^~
      |           ;
answer.code:10:14: error: ‘k’ was not declared in this scope
   10 |         cin>>k;
      |              ^
answer.code:11:12: error: request for member ‘insert’ in ‘st’, which is of non-class type ‘int’
   11 |         st.insert(k);
      |            ^~~~~~
answer.code:13:11: error: request for member ‘size’ in ‘st’, which is of non-class type ‘int’
   13 |     if(st.size()>=3) cout<<"Yes\n";
      |           ^~~~