/ WOJ /

记录详情

Wrong Answer


  
# 状态 耗时 内存占用
#1 Wrong Answer 成绩取消 0ms 0 Bytes

代码

#include <bits/extc++.h>
#define endl '\n'
typedef long long ll;
#define int ll
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

vector<int> ps;

bool np[5000001];

void init(const int n) {
  for (int i = 2; i <= n; ++i) {
    if (!np[i]) {
      ps.push_back(i);
    }
    for (const int pj: ps) {
      if (i * pj > n) {
        break;
      }
      np[i * pj] = true;
      if (i % pj == 0) {
        break;
      }
    }
  }
}

void Main() {
  int n;
  cin >> n;
  vector<int> a(n);
  int lmt = 0;
  for (auto &x: a) {
    cin >> x;
  }
  if (n == 1) {
    cout << "yEs" << endl;
  } else if (n == 2 && a[0] != a[1]) {
    cout << "nO" << endl;
  } else {
    //
  }
}

#define CP_MULTI_TEST_CASES

signed main() {
  ios::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
  init(5000001);
  int t = 1;
#ifdef CP_MULTI_TEST_CASES
  cin >> t;
#endif
  while (t--) {
    Main();
  }
  return cout << flush, fflush(stdout), 0;
}

信息

递交者
类型
递交
题目
P1000 云剪贴板
题目数据
下载
语言
C++
递交时间
2025-07-22 13:11:57
评测时间
2025-07-22 13:12:00
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes