Submission #19014733
Source Code Expand
Copy
#include <bits/stdc++.h>
using namespace std;
typedef signed long long ll;
#define _P(...) (void)printf(__VA_ARGS__)
#define FOR(x,to) for(x=0;x<(to);x++)
#define FORR(x,arr) for(auto& x:arr)
#define FORR2(x,y,arr) for(auto& [x,y]:arr)
#define ALL(a) (a.begin()),(a.end())
#define ZERO(a) memset(a,0,sizeof(a))
#define MINUS(a) memset(a,0xff,sizeof(a))
template<class T> bool chmax(T &a, const T &b) { if(a<b){a=b;return 1;}return 0;}
template<class T> bool chmin(T &a, const T &b) { if(a>b){a=b;return 1;}return 0;}
//-------------------------------------------------------
vector<pair<int,int>> V;
void count() {
set<int> A,B,C,D;
FORR(c,V) {
A.insert(c.second);
B.insert(c.first-c.second);
C.insert(c.second);
D.insert(c.first+c.second);
}
cout<<A.size()<<" "<<B.size()<<" "<<C.size()<<" "<<D.size()<<endl;
}
void solve() {
int i,j,k,l,r,x,y; string s;
vector<pair<int,int>> R;
for(x=0;x<100;x+=10) {
FOR(y,10) R.push_back({x,y});
}
for(r=0;r<10;r++) {
FORR(a,R) V.push_back({a.first+1000*r,a.second+1000*r});
}
//count();
cout<<V.size()<<endl;
FORR(v,V) cout<<v.first<<" "<<v.second<<endl;
}
int main(int argc,char** argv){
string s;int i;
if(argc==1) ios::sync_with_stdio(false), cin.tie(0);
FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
cout.tie(0); solve(); return 0;
}
Submission Info
Submission Time |
|
Task |
B - Bowling |
User |
kmjp |
Language |
C++ (GCC 9.2.1) |
Score |
800 |
Code Size |
1412 Byte |
Status |
AC |
Exec Time |
3 ms |
Memory |
3600 KB |
Compile Error
./Main.cpp: In function ‘void solve()’:
./Main.cpp:31:6: warning: unused variable ‘i’ [-Wunused-variable]
31 | int i,j,k,l,r,x,y; string s;
| ^
./Main.cpp:31:8: warning: unused variable ‘j’ [-Wunused-variable]
31 | int i,j,k,l,r,x,y; string s;
| ^
./Main.cpp:31:10: warning: unused variable ‘k’ [-Wunused-variable]
31 | int i,j,k,l,r,x,y; string s;
| ^
./Main.cpp:31:12: warning: unused variable ‘l’ [-Wunused-variable]
31 | int i,j,k,l,r,x,y; string s;
| ^
./Main.cpp: In function ‘int main(int, char**)’:
./Main.cpp:6:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::__cxx11::basic_string<char>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
6 | #define FOR(x,to) for(x=0;x<(to);x++)
| ^
./Main.cpp:52:38: note: in expansion of macro ‘FOR’
52 | FOR(i,argc-1) s+=argv[i+1],s+='\n'; FOR(i,s.size()) ungetc(s[s.size()-1-i],stdin);
| ^~~
Judge Result
Set Name |
Sample |
All |
Score / Max Score |
0 / 0 |
800 / 800 |
Status |
|
|
Set Name |
Test Cases |
Sample |
example0.txt |
All |
example0.txt |
Case Name |
Status |
Exec Time |
Memory |
example0.txt |
AC |
3 ms |
3600 KB |