Skip to content

Instantly share code, notes, and snippets.

View surinoel's full-sized avatar
๐ŸŽฏ
Focusing

11 surinoel

๐ŸŽฏ
Focusing
View GitHub Profile
#include <iostream>
using namespace std;
int a[100][100];
int b[100][100];
int main(void) {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
#include <vector>
#include <iostream>
using namespace std;
int n;
long long m;
vector<vector<long long>> mat;
vector<vector<long long>> base;
#include <stdio.h>
int main(void) {
int a = 0x01020304;
char *p;
p = (char *)&a;
for(int i=0; i<4; i++) {
printf("0x%02x\n", *(p + i));
}
#include <stdio.h>
int main(void) {
int i = 100;
double d = 3.14;
void* p = &i;
*(int*)p = 200;
printf("%d\n", i);
#include <stdio.h>
int main(void) {
int numArr[3][4] = {
{ 11, 22, 33, 44 },
{ 55, 66, 77, 88 },
{ 99, 110, 121, 132 }
};
// int** numPtr = numArr; // ๊ฐ•์ œ ์บ์ŠคํŒ… (int**)ํ•˜๋ฉด ์‹คํ–‰์€ ๋˜์ง€๋งŒ, ๊ฒฐ๊ตญ -๊ฐ’์„ ๋ฆฌํ„ดํ•˜๋ฉด์„œ ๋๋‚œ๋‹ค
#if 0
๋ฐ˜ํ™˜๊ฐ’์ž๋ฃŒํ˜• ํ•จ์ˆ˜์ด๋ฆ„(์ž๋ฃŒํ˜• ๋งค๊ฐœ๋ณ€์ˆ˜[][๊ฐ€๋กœํฌ๊ธฐ])
{
}
๋ฐ˜ํ™˜๊ฐ’์ž๋ฃŒํ˜• ํ•จ์ˆ˜์ด๋ฆ„(์ž๋ฃŒํ˜•(*๋งค๊ฐœ๋ณ€์ˆ˜)[๊ฐ€๋กœํฌ๊ธฐ])
{
}
#endif
#include <stdio.h>
#include <string>
#include <iostream>
using namespace std;
int score;
int frame[11], is_strike[11], is_spare[11];
int totalsum(int frameNum) { // ์ด ์ ์ˆ˜ ๊ณ„์‚ฐ
int sum = 0;
#include <stdio.h>
int frame[11], is_strike[11], is_spare[11];
int score;
int totalsum(int frameNum) {
int sum = 0;
for (int i = 1; i <= frameNum; i++) {
sum += frame[i];
}
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
int main(int argc, char **argv)
{
return 0;
}
#include <stdio.h>
int main(void) {
int arr[5] = { 1, 2, 3, 4, 5 };
printf("(arr) addr : %p\n", arr);
printf("(arr + 1) addr : %p\n", arr + 1);
printf("(&arr + 1) addr : %p\n", &arr + 1);
return 0;
}