Submission #19016443


Source Code Expand

Copy
//#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
using namespace std;
typedef long long llo;
#define mp make_pair
#define pb push_back
#define a first 
#define b second
#define endl '\n'

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	vector<pair<int,int>> ss;
	vector<pair<int,int>> ans;
	int cur=1;
	for(int i=1;i<=10;i++){
		for(int j=1;j<=10;j++){
			ss.pb({cur,j});
		}
		cur+=10;
	}
	for(int i=0;i<10;i++){
		for(auto j:ss){
			ans.pb(j);
		}
		for(int j=0;j<ss.size();j++){
			ss[j].a+=1000;
			ss[j].b+=1000;
		}
	}
	cout<<ans.size()<<endl;
	set<int> aa;
	set<int> bb;
	set<int> cc;
	set<int> dd;
	for(auto j:ans){
		aa.insert(j.a);
		bb.insert(j.b);
		cc.insert(j.a-j.b);
		dd.insert(j.a+j.b);
		/*if(j.b>1e9 or j.a>1e9 or j.a<0 or j.b<0){
			cout<<11<<endl;
		}*/
		cout<<j.a<<" "<<j.b<<endl;
	}
	//cout<<aa.size()<<" "<<bb.size()<<" "<<cc.size()<<" "<<dd.size()<<endl;






 
	return 0;
}

Submission Info

Submission Time
Task B - Bowling
User kshitij_789
Language C++ (GCC 9.2.1)
Score 800
Code Size 993 Byte
Status AC
Exec Time 9 ms
Memory 3680 KB

Compile Error

./Main.cpp: In function ‘int main()’:
./Main.cpp:27:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::pair<int, int> >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
   27 |   for(int j=0;j<ss.size();j++){
      |               ~^~~~~~~~~~

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 800 / 800
Status
AC × 1
AC × 1
Set Name Test Cases
Sample example0.txt
All example0.txt
Case Name Status Exec Time Memory
example0.txt AC 9 ms 3680 KB