Tarek.97's blog

By Tarek.97, history, 2 weeks ago, In English

Code template

#include<bits/stdc++.h>
using namespace std;
#define endl "\n"
#define yes cout<<"YES\n"
#define no cout<<"NO\n"
#define ft first
#define sc second
#define int long long
int mod = 1000000007;
int N = 1000000;
vector<int> p;
vector<bool> isprime(N, true);
void seive()
{
    for (int i = 2; i < N; i++)
    {
        if (isprime[i])
        {
            p.push_back(i);
            for (int j = i * i; j < N; j += i)
            {
                isprime[j] = false;
            }
        }
    }
}
int binpow(int a, int b)
{
    int res = 1;
    while (b > 0)
    {
        if (b & 1)
            res = res * a;
        a = a * a;
        b >>= 1;
    }
    return res;
}
int32_t main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    
}

vs code json file for c++

{ "code-runner.runInTerminal": true, "code-runner.saveFileBeforeRun": true, "workbench.colorCustomizations": {

"terminal.foreground": "#00ff40",
"terminal.background": "#000000"
},
"workbench.editor.autoLockGroups": {},
"code-runner.executorMap": {


    "javascript": "node",
    "java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
    "c": "cls && cd $dir  && gcc -g3 -Wall \"$fileName\" -o \"$fileNameWithoutExt\".exe && .\\\"$fileNameWithoutExt\" && echo. && echo. && echo .COMPLETED.",
    "cpp": "cls && cd $dir  && g++ -g3 -Wall \"$fileName\" -o \"$fileNameWithoutExt\".exe && .\\\"$fileNameWithoutExt\" && echo. && echo. && echo .COMPLETED.",
    "objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    "php": "php",
    "python": "python -u",
    "perl": "perl",
    "perl6": "perl6",
    "ruby": "ruby",
    "go": "go run",
    "lua": "lua",
    "groovy": "groovy",
    "powershell": "powershell -ExecutionPolicy ByPass -File",
    "bat": "cmd /c",
    "shellscript": "bash",
    "fsharp": "fsi",
    "csharp": "scriptcs",
    "vbscript": "cscript //Nologo",
    "typescript": "ts-node",
    "coffeescript": "coffee",
    "scala": "scala",
    "swift": "swift",
    "julia": "julia",
    "crystal": "crystal",
    "ocaml": "ocaml",
    "r": "Rscript",
    "applescript": "osascript",
    "clojure": "lein exec",
    "haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
    "rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
    "racket": "racket",
    "scheme": "csi -script",
    "ahk": "autohotkey",
    "autoit": "autoit3",
    "dart": "dart",
    "pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
    "d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
    "haskell": "runhaskell",
    "nim": "nim compile --verbosity:0 --hints:off --run",
    "lisp": "sbcl --script",
    "kit": "kitc --run",
    "v": "v run",
    "sass": "sass --style expanded",
    "scss": "scss --style expanded",
    "less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
    "FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    "fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    "fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
    "fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
},
"terminal.integrated.defaultProfile.windows": "Command Prompt",
"code-runner.preserveFocus": false,
"editor.fontLigatures": true,
"editor.cursorBlinking": "expand",
"editor.formatOnPaste": true,
"editor.formatOnType": true,
"editor.codeActionsOnSave": {

},
"code-runner.executorMapByGlob": {

    "pom.xml": "cd $dir && mvn clean package"
},
"terminal.integrated.enableMultiLinePasteWarning": false,
"editor.accessibilitySupport": "on",
"workbench.colorTheme": "One Dark Pro Darker",
"workbench.iconTheme": "material-icon-theme",
"window.commandCenter": true,
"audioCues.diffLineDeleted": "off",
"audioCues.diffLineInserted": "off",
"audioCues.lineHasFoldedArea": "off",
"audioCues.lineHasInlineSuggestion": "off",
"audioCues.noInlayHints": "off",
"audioCues.onDebugBreak": "off",
"audioCues.taskFailed": "off",
"audioCues.terminalCommandFailed": "off",
"audioCues.taskCompleted": "off",
"audioCues.notebookCellFailed": "off",
"audioCues.notebookCellCompleted": "off",
"audioCues.diffLineModified": "off",
"audioCues.lineHasBreakpoint": "off",
"audioCues.lineHasError": "off",
"npm.exclude": "",
"files.autoSave": "onFocusChange",
"json.schemas": [


],
"git.autofetch": true,
"git.confirmSync": false,
"security.workspace.trust.untrustedFiles": "open",
"launch": {

    "configurations": [],
    "compounds": []
}

}

fast IO

ios_base::sync_with_stdio(false);
cin.tie(NULL);
  • Vote: I like it
  • -17
  • Vote: I do not like it

»
2 weeks ago, # |
  Vote: I like it +1 Vote: I do not like it

Auto comment: topic has been updated by Tarek.97 (previous revision, new revision, compare).

»
2 weeks ago, # |
  Vote: I like it +5 Vote: I do not like it

thank you for your contributions to society

»
2 weeks ago, # |
  Vote: I like it +4 Vote: I do not like it

Apart from the Fast IO, I am too dumb to understand a single line of code that u have written and doesn't even know what this code will do. Any kind of help is appreciated.

»
2 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Nc