chore: add knightPacking program

main
CrimsonTome 2023-02-05 23:48:05 +00:00 committed by Rowan Clark
parent d0d4756681
commit 4776eebbd2
No known key found for this signature in database
GPG Key ID: F620D51904044094
3 changed files with 79 additions and 0 deletions

58
.gitignore vendored Normal file
View File

@ -0,0 +1,58 @@
# Created by https://www.toptal.com/developers/gitignore/api/visualstudiocode,c++
# Edit at https://www.toptal.com/developers/gitignore?templates=visualstudiocode,c++
### C++ ###
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
### VisualStudioCode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
# End of https://www.toptal.com/developers/gitignore/api/visualstudiocode,c++

5
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,5 @@
{
"files.associations": {
"iostream": "cpp"
}
}

16
knightPacking/main.cpp Normal file
View File

@ -0,0 +1,16 @@
#include <iostream>
using namespace std;
int main(){
int x;
cin >> x;
if (x % 2 == 0)
{
cout << "second" << endl;
}
else {
cout << "first" << endl;
}
return 0;
}