E D R , A S I H C RSS

BackLinks search for "n"

BackLinks of n


Search BackLinks only
Display context of search results
Case-sensitive searching
  • AcceleratedC++/Chapter10
         ||[[TableOfContents]]||
         = Chapter 10 Managing memory and low-level data structures =
         지금까지는 vector, string등 STL이 기본적으로 제공하는 자료구조를 통해서 프로그래밍을 하였다.
         == 10.1 Pointers and arrays ==
         포인터(pointer) 임의 접근 반복자로서, 배열의 요소들을 접근하기 위해서는 필수, 다른 용도로도 많이 이용된다.
          || 포인터(pointer) || 주소를 나타내는 값 ||
          || 역참조 연산자(dereference operator) || 포인터 p가 가리키는 객체를 리턴한다. ||
          보통 프로그래머가 포인터를 초기화시키는 값으로 이용하는 값은 0이다. 흔이 이를 '''널 포인터(null pointer)'''라고 부른다.
          포인터도 타입을 갖는데 일반적으로 type-name * 으로 정의한다.
          {{{~cpp int *p; // *p는 int 타입을 갖는다.
         int* p; // p는 int*라는 것을 강조하는 표현이다. C컴파일러는 * 주변의 공백을 무시하기 때문에 상기의 2개 표현은 완전히 동일하다.
          {{{~cpp int* p, q; // p는 int* 인 포인터 형식, q는 int 형을 가리킨다.
         //pointer_example.cpp
         #include <iostream>
         using std::cout;
         using std::endl;
         int main()
          int x = 5;
          // `p' points to `x'
          int* p = &x;
  • AcceleratedC++/Chapter5
         ||[[TableOfContents]]||
         = Chapter 5 Using sequential containers and analyzing strings =
          * 여태까지 vector랑 string 갖고 잘 놀았다. 이제 이것들을 넘어서는 것을 살펴볼 것이다. 그러면서 라이브러리 사용법에 대해 더 깊게 이해하게 될것이다. 라이브러리는 자료구조?함수만을 제공해주는 것이 아니다. 튼튼한 아키텍쳐도 반영해준다. 마치 vector의 사용법을 알게 되면, 다른것도 쉽게 배울수 있는것처럼...
          == 5.1 Separating students into categories ==
         bool fgrade(const Student_info& s)
          return grade(s) < 60;
         vector<Student_info> extract_fails(vector<Student_info>& students)
          vector<Student_info> pass, fail;
          for(vector<Student_info>::size_type i = 0; i != students.size() ; ++i)
          if(fgrade(students[i]))
          fail.push_back(students[i]);
          pass.push_back(students[i]);
          students = pass;
          return fail;
          * 참조로 넘어간 students의 점수를 모두 읽어들여서, 60 이하면 fail 벡터에, 아니면 pass 벡터에 넣은 다음, students 벡터를 pass벡터로 바꿔준다. 그리고 fail을 리턴해준다. 즉 students에는 f 아닌 학생만, 리턴된 vector에는 f 뜬 학생만 남아있게 되는 것이다. 뭔가 좀 삐리리하다. 더 쉬운 방법이 있을 듯하다.
          === 5.1.1 Erasing elements in place ===
          * 그렇다. 메모리 낭비가 있는 것이다. for루프가 끝날때에는 중복되는 두개의 벡터가 존재하는 것이다. 그래서 우리가 쓸 방법은 만약 f면 fail에 추가하고, f 아니면 그 자리에서 지우는 것이다. 반갑게도 이런 기능이 있다. 근데 졸라 느리다. 입력 데이터의 양이 커질수록 성능 저하는 급격하다. 벡터에서는 중간에 하나를 지우면, 메모리를 통째로 다시 할당하고, 지워주는 짓을 해야한다. O(n*n)의 시간이 필요한것으로 알고 있다. 벡터는 임의 접근이 가능한 대신, 중간 삽입이나 중간 삭제의 퍼포먼스를 포기한 것이다. 이제부터 여러가지 방법을 살펴볼 것이다.
         vector<Student_info> extract_fails(vector<Student_info>& students)
          vector<Student_info> fail;
          vector<Student_info>::size_type i = 0
  • AcceleratedC++/Chapter8
         || [[TableOfContents]] ||
         = Chapter 8 Writing generic functions =
         WikiPedia:Generic_function : 함수를 호출하기 전까지는 그 함수의 매개변수 타입이 무엇인지 알 수 없는 함수.
         == 8.1 What is a generic function? ==
         WikiPedia:Generic_function : 함수의 호출시 인자 타입이나 리턴타입을 사용자가 알 수없다. ex)find(B,E,D)
         함수의 호출시 함수의 매개변수를 operand로 하여 행해지는 operator의 유효성을 컴파일러가 조사. 사용 가능성을 판단
         {{{~cpp ex) union(A, B) { return A+B; }
          union(A:string, " is...") (O), concaternate("COL", " is...") (X)}}}
         반복자를 생각해보자. 만약 특정 자료구조가 반복자를 리턴하는 멤버함수를 갖는 다면 반복자를 인자로 받는 function들에 대해서 그 자료구조는 유효하다고 판단할 수 있다.
          Runtime이 아니라 Compile 타임에 실제로 타입이 변화하는 객체를 적절히 작성하면 올바른 동작을 보장한다.
         //median.h
         #ifndef GUARD_median_h
         #define GUARD_median_h
         #include <algorithm>
         #include <stdexcept>
         #include <vector>
         using std::domain_error;
         using std::sort;
         using std::vector;
         T median(vector<T> v)
  • IsBiggerSmarter?
         [http://online-judge.uva.es/p/v101/10131.html 원문보기]
         === Input ===
         첫째 줄에는 찾아낸 코끼리 시퀀스의 길이를 나타내는 정수 n을 출력한다. 그 밑으로는 n줄에 걸쳐서 각 코끼리를 나타내는 양의 정수를 하나씩 출력한다. i번째 데이터 행으로 입력된 숫자들을 W[i], S[i]라고 표기해보자. 찾아낸 n마리의 코끼리의 시퀀스가 a[1], a[2], ... ,a[n] 이라면 다음과 같은 관계가 성립해야 한다.
         {{{ W[a[1]] < W[a[2]] < ... < W[a[n]]이고, S[a[1]] > S[a[2]] > ... > S[a[n]] }}}
         이런 관계가 만족되면서 n은 최대한 큰 값이어야 한다. 모든 부등호에는 등호는 포함되지 않는다. 즉 체중은 반드시 증가해야 하며(같으면 안됨), IQ는 감소해야 한다.(IQ도 같으면 안 됨). 조건이 맞으면 아무 답이나 출력해도 된다.
         === Sample Input ===
  • MatrixAndQuaternionsFaq
         [[TableOfContents]]
         == The Matrix and Quaternions FAQ ==
         Version 1.2 2nd September 1997
         This FAQ is maintained by "hexapod@netcom.com". Any additional suggestions or related questions are welcome. Just send E-mail to the above address.
         Contributions
          Introduction I1: steve@mred.bgm.link.com
         == Contents of article ==
         I1. Important note relating to OpenGL and this document
         Questions
         Q3. How do I represent a matrix using the C/C++ programming languages?
         Q4. What are the advantages of using matrices?
         Q5. How do matrices relate to coordinate systems?
         Q6. What is the identity matrix?
         Q7. What is the major diagonal matrix of a matrix?
         Q8. What is the transpose of a matrix?
         Q13. How do I multiply one or more vectors by a matrix?
         DETERMINANTS AND INVERSES
         Q14. What is the determinant of a matrix?
         Q15. How do I calculate the determinant of a matrix?
         Q16. What are Isotropic and Anisotropic matrices?
  • 김재현
         == Intro ==
         == Messengers ==
         msn--- syniori 골뱅이 hotmail.com
         싸이질--- syniori
         네이버블로그--- www.naver.com/syniori.do
         #include <stdio.h>
         #include <stdlib.h>
         #include <time.h>
         #define COUNT 6 // 당첨번호개수
         #define MAX 45 // 1-45
         #define TITLE "[ LOTTO RANDOM NUMBER GENERATOR ]\n"
         int main()
          unsigned char j,k,n, used[MAX];
          int i;
          printf(TITLE);
          printf("=================================\n");
          printf("Enter the game count: ");
          scanf("%d", &j);
          printf("=================================\n");
          srand(time(NULL));
  • 새싹교실/2012/열반/120507
         [[TableOfContents]]
         int main()
          int A[10]; // 정수형 데이터 10개
          printf("%d", A[0]); // 배열의 첫 번째 원소 출력
          * A[n]으로 선언할 경우 첨자는 0 부터 n-1 까지 쓸 수 있습니다.
          * 원소 간의 비교가 가능한 데이터 N개가 주어졌을 때, 각각의 데이터에 순위를 부여하는 방법에 대해 생각해보세요.
  • 새싹교실/2021/C발라먹기/임지민
         [[TableOfContents]]
         #include <stdio.h>
         int fac(int n){
          int result=1;
          int i;
          if (n == 0){
          return 1;
          for (i = n; i >= 1; i--)
          return result;
         int main(void) {
          int n;
          scanf("%d", &n);
          printf("%d", fac(n));
          return 0;
         #include <stdio.h>
         int pibo(int n){
          int arr[21];
          int i;
          if(n ==0){
          return 0;
  • 새싹교실/2022/Java보시던지/04.07
          표기법: int[] a;(자바방식)(뒤를 안봐도 배열인지 알수있기때문)
          * int a ={1,2,3,4,5}
          * length (c에서는 배열의 크기 구할수 없었음, But 자바는 기본으로 제공)
          * new연산자 ㅡ 기본값으로 초기화됨
          int 0 string null double 0.0 float 0.0f
          * for( int i= 0; i <5 ;i++)의 작성이유: 배열의 인덱스가 0부터 시작해서
          * int a[] = new int[n]; (C방식)
          * int[] a = new int[n]; (JAVA방식)
          * a.length => 'a'라는 배열의 길이
  • 오바마 협박글
         Do you know about Obama threats in South Korea?
         You never know what has happened in South Korea.
         A South Korean youth was arrested on suspicion of intimidating President Obama and threatening to kill Ambassador Lippert in 2015.
         Police and prosecutors have ignored his innocence claims since the beginning of the investigation and condemned him as a sexual pervert.
         For the politically inspired news leaks, police and prosecutors made him open to public criticism.
         South Korean journalists reproached him by revealing a distinctive hysteria of hatred and repulsion to disregard human rights of this man.
         During the trial toward guilty, attorneys and judges make up for the police and prosecutor's groundless and inconsistent investigation reports with modifications and complements.
         After about a year and two months of trial, the South Korean court sentenced him to 18 months in jail for allegedly attempting to threaten the US president because of fermenting the diplomatic troubles.
         He continued to make innocent claims, so he suffered hunger in solitary confinement during his imprisonment, harassed by jailers, and received unusual medicinal treatments in a psychiatric hospital.
         The corrupt doctors in a back-scratching alliance with jail injected unknown drugs to produce confession from him.
         South Koreans who numbed humanity forced him to commit suicide in order to close the case. For the first time in his life, he was greatly disappointed by the human nature.
         The prosecutor appealed against the decision because. 형량이 너무 가볍다. 그리고 검사는 징역 4년 6개월을 요구하다.
         About two and a half years later, the second trial is ongoing. The court has failed to make a ruling on the appeal, and has still extended his ban on leaving the country.
         The fabricated evidence at the first trial is found to have been concocted by his devoted mother, it is necessary to the judicial officers to start afresh to revise and to supplement to maintain to convict of the charge.
         The South Korean government will soon be choose the method of sentencing guilty, soothe the US government's anger, and conceal the torture and medication.
         If you keep the interest on this case, reveal the truth and remember him, he can get a fair trial in South Korea.
         I think there is no other way to help him better than this.
         If this is happening to our world as our indifference continues to build up, you maybe end up with facing the similar thing because the next will be you.
         Attach the news article that reported the case and the detailed document according to one likes.
         Unfortunately, I cannot respond to your inquiries because of South Korea's Internet censorship, intelligence tracking and monitoring by Korean National Police Agency Cyber Bureau (an intelligence service).
Found 10 matching pages out of 7548 total pages

You can also click here to search title.

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
Processing time 0.0361 sec