QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#110970#3132. The League of Sequence DesignersowkyehfsmkbrgumpneWA 2ms3372kbC++202.1kb2023-06-05 02:57:382023-06-05 02:57:41

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-05 02:57:41]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3372kb
  • [2023-06-05 02:57:38]
  • 提交

answer

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

/* TYPES  */
#define ll long long
#define ld long double
#define pii pair<int, int>
#define pll pair<long long, long long>
#define vi vector<int>
#define vll vector<long long>
#define mii map<int, int>
#define si set<int>
#define sc set<char>

/* FUNCTIONS */
#define f(i,s,e) for(long long int i=s;i<e;i++)
#define trav(a, x) for (auto &a : x)
#define cf(i,s,e) for(long long int i=s;i<=e;i++)
#define rf(i,e,s) for(long long int i=e-1;i>=s;i--)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
#define fi first
#define se second
#define lb lower_bound
#define ub upper_bound
#define rall(x) x.rbegin(), x.rend()

/* TESTING */
#define dbg(x) cout << #x << " = " << x << endl;
#define fastio ios::sync_with_stdio(false); cin.tie(NULL); // cout.tie(NULL);
#define cinx(array) for(auto& x : array) cin >> x;

/* CONSTANTS */
#define MOD 1000000007
#define INF 1e18

// Vector, set, string, const char
template <class Ch, class Tr, class Container>
basic_ostream <Ch, Tr> & operator << (basic_ostream <Ch, Tr> & os, Container const& x) {
   os << "{ ";
   for(auto& y : x) os << y << " ";
   return os << "}";
}

// map
template <class X, class Y>
ostream & operator << (ostream & os, pair <X, Y> const& p) {
   return os << "[ " << p.first << ", " << p.second << "]" ;
}

void solve(){
   int k, l;
   cin >> k >> l;

   int tot = 1999 + k;
   cout << 1999 << endl;
   cout << -1;

   if (l >= 2000){
      return;
   }

   f(i, 0, 1997){
      cout << " " << tot / 1998;
   }
   cout << " " << tot - tot / 1998 * 1997 << endl;
   // int arr[2000] = {};
   // arr[1] = -1;

   // fill(arr+2 , arr+2000 , (1999 + k) / 1998) ;
   // arr[1999] += (1999 + k ) % 1998 ;

   // cout << 1999 << '\n' ;
   // for(int i = 1 ; i <= 1999 ; i++){
   //    cout << arr[i] << ' ' ;
   // }
   // cout << '\n' ;
}

int main(){
   fastio;

   int t;
   cin >> t;

	while(t--){
      solve();
	}

   return 0;
}









详细

Test #1:

score: 0
Wrong Answer
time: 2ms
memory: 3372kb

input:

3
8 3
612 7
4 2019

output:

1999
-1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

result:

wrong answer  (test case 3)