some other user’s code
include <bits/stdc++.h>
using namespace std;
define ar array
define int long long // Use long long for potentially larger integer values
define ld long double
define sza(x)((int) x.size())
define all(a)(a).begin(), (a).end()
define loop(i, n) for (int i = 0; i < n; i++)
define Loop(i, n) for (int i = 1; i <= n; i++)
define sortv(v) sort(v.begin(), v.end())
define pb(n) push_back(n)
define sorta(a, n) sort(a, a + n)
// div 4 me 4 questions karne hai
// div 3 me 3 questions karne hai
void solve() {
int n;
cin >> n;
cout<<2<<endl;
for(int i=1;i<=n;i++){
cout<<i<<" “;
}
cout<<endl;
for(int i=n;i>=1;i–){
cout<<i<<” ";
}
cout<<endl;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int tc=1;
// cin >> tc;
for (int t = 1; t <= tc; t++) {
solve();
}
return 0; // Added return statement for main
}
my code
include <bits/stdc++.h>
using namespace std;
void solve() {
int n;
cin >> n;
cout << 2 << endl;
for(int i = 1; i <= n; i++){
cout << i << " ";
}
cout << endl;
for(int i = n; i >= 1; i--){
cout << i << " ";
}
cout << endl;
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int tc = 1;
// cin >> tc;
for (int t = 1; t <= tc; t++) {
// cout << “Case #” << t << ": ";
solve();
}
return 0;
}
Are you seriously calling these 2 solutions to be copied,
This is the first problem in the contest. Literally no one would wanna copy this one, I solved this in a minute if I am not wrong.
This is ridiculous to say the least, the problem is a simple basic greedy where just 2 sequences of ordered and reversed order are the answers(even the editorial has the same approach), I am sure a very large percentage of applications would have used the same logic and approach, it just has two loops with a variable i, How can you possibly call it a copy
I’m actually quite surprised how only two solutions have matched throughout, I am sure there would be much more solutions which are extremely similar to this
All these solutions have is a printing 2(there is no other way in the world to do it in c++), creating two for loops with i as variable, I just have a endl at the end how on earth could you do any of it the other way
And please don’t tell me both these solutions have the same boilerplate(this is the most typical one)
You should have done some more cross checking before flagging me, go through the solutions and kindly answer my questions if you still wish to proceed, but in case if you flag me, I would honestly lose interest to give contests anymore on this platform. Providing just 1 day window to challenge is evil, I found this purely by luck
one suggestion from my side is, remove the parts like boilerplate, trivial cout statements, (also for the cout << “yes”) and only flag if the solutions exceed about 10 - 15 lines in length(actual implementation code that runs in the solve), normalize the variable names and the numbers, and then run you MOSS
It would be if not embarrassing, frustrating to have a copied badge over profile when one have not committed any wrong doing that too for the first problem
kindly delete this topic once this issue is fixed, I think this could be of some disturbance other users.