Submission #504075

#TimeUsernameProblemLanguageResultExecution timeMemory
504075Newtech66Detecting Molecules (IOI16_molecules)C++17
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> using namespace std; using lol=long long int; #define endl "\n" const lol mod1=1e9+7,mod2=998244353; const lol inf=1e18+8; const double eps=1e-12; const double PI=acos(-1.0); const int N=2e5+5; #include <ext/pb_ds/assoc_container.hpp> // Common file #include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update using namespace __gnu_pbds; typedef tree<pair<int,int>,null_type,less<pair<int,int> >,rb_tree_tag,tree_order_statistics_node_update> ordered_set; //mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); vector<int> find_subset(int l,int u,vector<int> w) { int n=w.size(); for(int i=0;i<n;i++) { if(l<=w[i] && w[i]<=u) { return {i}; } } for(int i=0;i<n;i++) { for(int j=i+1;j<n;j++) { if(l<=w[i]+w[j] && w[i]+w[j]<=u) { return {i,j}; } } } return {}; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int _=1; //cin>>_; while(_--) { int n,l,u; cin>>n>>l>>u; vector<int> w(n); for(int i=0;i<n;i++) cin>>w[i]; vector<int> result=find_subset(l,u,w); cout<<ssize(result)<<endl; for(auto e:result) cout<<e<<" "; } return 0; }

Compilation message (stderr)

molecules.cpp: In function 'int main()':
molecules.cpp:52:11: error: 'ssize' was not declared in this scope; did you mean 'dysize'?
   52 |     cout<<ssize(result)<<endl;
      |           ^~~~~
      |           dysize