Take a look at this C++ submission 199864568:
#import <bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin >> a;
cout << ((a%2==0 && a>2) ? "YES" : "NO");
}

Don't see it?
Spoilers
| # | User | Rating |
|---|---|---|
| 1 | Benq | 3676 |
| 2 | Kevin114514 | 3659 |
| 3 | jiangly | 3640 |
| 4 | turmax | 3450 |
| 5 | tourist | 3382 |
| 6 | strapple | 3360 |
| 7 | Um_nik | 3354 |
| 8 | squareOf105 | 3348 |
| 9 | maroonrk | 3312 |
| 10 | idontwannadothis…e | 3191 |
| # | User | Contrib. |
|---|---|---|
| 1 | Qingyu | 155 |
| 2 | nik_exists | 151 |
| 3 | maspy | 149 |
| 4 | AmShZ | 145 |
| 5 | Um_nik | 143 |
| 6 | Errichto | 139 |
| 7 | BledDest | 136 |
| 8 | adamant | 134 |
| 9 | maroonrk | 132 |
| 10 | cry | 130 |
Take a look at this C++ submission 199864568:
#import <bits/stdc++.h>
using namespace std;
int main()
{
int a;
cin >> a;
cout << ((a%2==0 && a>2) ? "YES" : "NO");
}

Take a closer look at the code =P
Look even closer.
Read the first line.
The first line uses #import instead of the usual #include.
The other day, I was coding some C++. My Pythonic muscle memory caused me to accedently write #import instead of #include, and to my great surprise, the code still compiled!
The only information that I was able to find about #import is from this stackoverflow comment. As I understand it, #import is a really old gcc feature that combines #include and #pragma once into one.
There are arguably some other positives to using #import instead of #include. #import is one character shorter than #include, and as someone that mainly uses Python, it is easier for me to remember import than include.
| Name |
|---|



Haven't seen it. Need to take a look at spoil before.
It's well-know trick in codegolf.
That's actually a well-known trick in China.
thought it was the missing return 0
"one character shorter" is important :D for short-code contests!
There's a typo: should be
#pragmainstead of#prama.Fixed
Chat GPT's answer to "Why is #import deprecated in C++?"
The #import directive was never actually part of the C++ language specification. Instead, it was a Microsoft-specific extension to the language that allowed developers to include type libraries in their code.
Type libraries are files that describe the interfaces of COM (Component Object Model) objects. The #import directive allowed C++ developers to automatically generate C++ classes that encapsulated the interfaces of COM objects described in a type library.
However, because the #import directive was a non-standard extension to the C++ language, it was not portable to other platforms or compilers. Additionally, the use of COM has decreased in recent years, so there is less need for the #import directive.
As a result, the #import directive has been deprecated by Microsoft in favor of using the more portable #include directive to include header files that define C++ classes and functions.
#importis completely different depending on MSVC or GCC. That answer chatGPT gave is about MSVC'S#import, but this blog is about GCC's#import.