robots.cpp:18:7: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
18 | toy a[1e6];
| ^~~
robots.cpp:18:7: error: could not convert '1.0e+6' from 'double' to 'long unsigned int'
robots.cpp:18:7: error: size of array 'a' has non-integral type 'double'
robots.cpp:20:5: error: conflicting declaration 'int a'
20 | int a,b,x[5e4],y[5e4];
| ^
robots.cpp:18:5: note: previous declaration as 'toy a [1]'
18 | toy a[1e6];
| ^
robots.cpp:20:11: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
20 | int a,b,x[5e4],y[5e4];
| ^~~
robots.cpp:20:11: error: could not convert '5.0e+4' from 'double' to 'long unsigned int'
robots.cpp:20:11: error: size of array 'x' has non-integral type 'double'
robots.cpp:20:18: error: conversion from 'double' to 'long unsigned int' in a converted constant expression
20 | int a,b,x[5e4],y[5e4];
| ^~~
robots.cpp:20:18: error: could not convert '5.0e+4' from 'double' to 'long unsigned int'
robots.cpp:20:18: error: size of array 'y' has non-integral type 'double'
robots.cpp: In function 'bool check(int)':
robots.cpp:31:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
31 | for(int i = 0; i < a; i++)
| ~~^~~
robots.cpp:34:26: error: 'k' was not declared in this scope
34 | while(br<z&&p<t&&k[p].w<=x[i])
| ^
robots.cpp:41:46: error: 'k' was not declared in this scope
41 | for(int i = p; i < t; i++) pom.push_back(k[i]);
| ^
robots.cpp:47:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<toy>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
47 | while(br<z&&p<pom.size()&&k[p].s<=y[i])
| ~^~~~~~~~~~~
robots.cpp:47:35: error: 'k' was not declared in this scope
47 | while(br<z&&p<pom.size()&&k[p].s<=y[i])
| ^
robots.cpp:53:13: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<toy>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | return p>=pom.size();
| ~^~~~~~~~~~~~
robots.cpp: In function 'int putaway(int, int, int, int*, int*, int*, int*)':
robots.cpp:64:7: error: incompatible types in assignment of 'int' to 'toy [1]'
64 | a = A;
| ~~^~~
robots.cpp:71:9: error: 'k' was not declared in this scope
71 | k[i].w = W[i];
| ^
robots.cpp:74:19: error: invalid operands of types 'int [1]' and 'toy [1]' to binary 'operator+'
74 | if(a) sort(x,x+a);
| ~^~
| | |
| | toy [1]
| int [1]
robots.cpp:76:40: error: 'w' was not declared in this scope
76 | for(int i = 0; i < T; i++) if((!a||w[i]>x[a-1])&&(!b||s[i]>y[b-1])) return -1;
| ^
robots.cpp:76:46: error: invalid types 'int [1][toy*]' for array subscript
76 | for(int i = 0; i < T; i++) if((!a||w[i]>x[a-1])&&(!b||s[i]>y[b-1])) return -1;
| ^
robots.cpp:76:59: error: 's' was not declared in this scope
76 | for(int i = 0; i < T; i++) if((!a||w[i]>x[a-1])&&(!b||s[i]>y[b-1])) return -1;
| ^