VioletaBabel
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354#include#include using namespace std;int main(){ queue q; priority_queue pq; int t, n, m, paper, ans = 0, pos, now; for (scanf("%d", &t); t--; ans = 0) { scanf("%d %d", &n, &m); pos = m; now = n; for (int i = 0; i
https://sourceforge.net/projects/csjson/?source=typ_redirect 여기에 있는 압축파일의 dll 파일을 소스코드가 있는 곳에 넣는다. 다음 솔루션 탐색기에서 참조를 오른쪽 클릭해 참조 추가로 해당 dll 파일을 넣어주고 using System.Net.Json; 을 넣어준 후 save, load 버튼을 만든다. 123456789101112131415161718192021 Colored by Color Scriptercs1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374..
12345678910111213141516 Colored by Color Scriptercs 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Cont..
123456789101112131415161718192021222324252627282930313233343536373839404142#includeint main(){ int n, m, ans = 50*50; char chess[50][51]; scanf("%d %d", &n, &m); for (int i = 0; i
123456789101112131415161718192021222324252627282930313233343536373839404142#includeint main(){ int n, num[505], ans = 505; scanf("%d", &n); for (int i = 123, j = 0, h = 0, t = 0, o = 0; i
12345678910111213141516171819202122232425 Colored by Color Scriptercs 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451..
WPF : 프로그래머가 사용하는 C# + 디자이너가 사용하는 XML 비주얼 스튜디오에서 WPF 앱을 만듦. c#은 확장자가 .cs ==========================계산기12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413..
class 클래스명; class로 선언하면 파일이 중복포함되는 것을 막고, 해당 파일을 사용할 것이라는 선언만 하며 파일을 포함하지 않는다. 그래서 include하는 것보다 컴파일 시간이 현저히 줄어든다. 단, 객체를 선언하려면 객체의 크기를 알아야하기에 include를 해주어야 하고, 포인터로 선언하려면 class로 해준다.include를 많이하면 꼬일 수 있다. 그를 방지하기 위한 것이기도 함.
12345678910111213#include using namespace cocos2d::experimental; //... bool A::init(){ AudioEngine::play2d("res/a.mp3", true); // 배경음악이 나옴, true는 루프. int AudioID = AudioEngine::play2d("res/a.mp3"); // 재생중인 음악의 ID가 나옴 AudioEngine::setVolume(AudioID, 0.5f)//볼륨이 0.5로 줄어듦 AudioEngine::setCurrentTime(audioID,1.0f); // 1초부터 재생 }Colored by Color Scriptercs --탱크게임 12345678910111213141516171819//GameScen..
바이너리 저장 방식 123456789101112131415 //c에서 제공하는 파일 출력 FILE* pFile = NULL; // 1번째 인수로 2중 포인터를 받는다. 하드디스크에 있는 주소를 가진 포인터를 인수로 받는다는 말 fopen_s(&pFile, "a.dat", "wb"); //주소를 가진 포인터의 주소를 넣어주는 것. //2번째 인수는 파일 이름, 뒤에는 wt, wb, rt, rb가 들어가는데, //w는 write, r은 read, t는 text, b는 binary이다. if (pFile != NULL) {//pFile을 못 열었을 때의 에러 방지책 int data = 100; //첫 인수는 주소인데 보이드의 포인터를 넣어줬음. 뭐든지 받을 수 있게 보이드. fwrite((void*)&data..