{"action":"created","comment":{"url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/comments/233002389","pull_request_review_id":174220230,"id":233002389,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzAwMjM4OQ==","diff_hunk":"@@ -1,5 +1,57 @@\n-#include <stdlib.h>\n+#include <stdio.h>\n+#include <malloc.h>\n \n-int main(void) {\n-    return EXIT_SUCCESS;\n+static void q_sort(int *a, int lower, int higher) {\n+\n+    int i = lower, j = higher;\n+    int tmp, sup_member;\n+    sup_member = a[(lower + higher) / 2];\n+\n+    do {\n+        while (a[i] < sup_member)\n+            i++;\n+        while (a[j] > sup_member)\n+            j--;\n+\n+        if (i <= j) {\n+            if (i < j) {\n+                tmp = a[i];\n+                a[i] = a[j];\n+                a[j] = tmp;\n+            }\n+            i++;\n+            j--;\n+        }\n+    } while (i <= j);\n+\n+    if (i < higher)\n+        q_sort(a, i, higher);\n+    if (lower < j)\n+        q_sort(a, lower, j);\n }\n+\n+int main() {\n+    int k, N;\n+    int *mas;\n+\n+    scanf(\"%d\", &N);\n+\n+    mas = malloc(N * sizeof(int));","path":"lab3-1/src/main.c","position":42,"original_position":42,"commit_id":"7fec489e7324f8399801e8927d01e9e76bc937ac","original_commit_id":"7fec489e7324f8399801e8927d01e9e76bc937ac","user":{"login":"bobrofon","id":2812655,"node_id":"MDQ6VXNlcjI4MTI2NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2812655?v=4","gravatar_id":"","url":"https://api.github.com/users/bobrofon","html_url":"https://github.com/bobrofon","followers_url":"https://api.github.com/users/bobrofon/followers","following_url":"https://api.github.com/users/bobrofon/following{/other_user}","gists_url":"https://api.github.com/users/bobrofon/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrofon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrofon/subscriptions","organizations_url":"https://api.github.com/users/bobrofon/orgs","repos_url":"https://api.github.com/users/bobrofon/repos","events_url":"https://api.github.com/users/bobrofon/events{/privacy}","received_events_url":"https://api.github.com/users/bobrofon/received_events","type":"User","site_admin":false},"body":"Обычно стараются не завязываться на тип элемента массива, и вместо `sizeof(int)` использовать `sizeof(*N)`.\r\nКстати `sizeof` - это оператор, поэтому можно опускать лишние скобки: `sizeof int == sizeof(int)`","created_at":"2018-11-13T11:38:33Z","updated_at":"2018-11-13T11:58:01Z","html_url":"https://github.com/bobrofon/nsu_prog_labs/pull/21#discussion_r233002389","pull_request_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/comments/233002389"},"html":{"href":"https://github.com/bobrofon/nsu_prog_labs/pull/21#discussion_r233002389"},"pull_request":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21","id":230109028,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMTA5MDI4","html_url":"https://github.com/bobrofon/nsu_prog_labs/pull/21","diff_url":"https://github.com/bobrofon/nsu_prog_labs/pull/21.diff","patch_url":"https://github.com/bobrofon/nsu_prog_labs/pull/21.patch","issue_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/21","number":21,"state":"open","locked":false,"title":"[msim-3-1] Release lab-3-1","user":{"login":"bobrofon","id":2812655,"node_id":"MDQ6VXNlcjI4MTI2NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2812655?v=4","gravatar_id":"","url":"https://api.github.com/users/bobrofon","html_url":"https://github.com/bobrofon","followers_url":"https://api.github.com/users/bobrofon/followers","following_url":"https://api.github.com/users/bobrofon/following{/other_user}","gists_url":"https://api.github.com/users/bobrofon/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrofon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrofon/subscriptions","organizations_url":"https://api.github.com/users/bobrofon/orgs","repos_url":"https://api.github.com/users/bobrofon/repos","events_url":"https://api.github.com/users/bobrofon/events{/privacy}","received_events_url":"https://api.github.com/users/bobrofon/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-11-12T11:53:55Z","updated_at":"2018-11-13T11:58:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"117923f1f4ca2bdc2b5596c1f23a6c4da8794615","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21/commits","review_comments_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21/comments","review_comment_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/21/comments","statuses_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/statuses/7fec489e7324f8399801e8927d01e9e76bc937ac","head":{"label":"bobrofon:msim-3-1","ref":"msim-3-1","sha":"7fec489e7324f8399801e8927d01e9e76bc937ac","user":{"login":"bobrofon","id":2812655,"node_id":"MDQ6VXNlcjI4MTI2NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2812655?v=4","gravatar_id":"","url":"https://api.github.com/users/bobrofon","html_url":"https://github.com/bobrofon","followers_url":"https://api.github.com/users/bobrofon/followers","following_url":"https://api.github.com/users/bobrofon/following{/other_user}","gists_url":"https://api.github.com/users/bobrofon/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrofon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrofon/subscriptions","organizations_url":"https://api.github.com/users/bobrofon/orgs","repos_url":"https://api.github.com/users/bobrofon/repos","events_url":"https://api.github.com/users/bobrofon/events{/privacy}","received_events_url":"https://api.github.com/users/bobrofon/received_events","type":"User","site_admin":false},"repo":{"id":147659938,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc2NTk5Mzg=","name":"nsu_prog_labs","full_name":"bobrofon/nsu_prog_labs","private":false,"owner":{"login":"bobrofon","id":2812655,"node_id":"MDQ6VXNlcjI4MTI2NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2812655?v=4","gravatar_id":"","url":"https://api.github.com/users/bobrofon","html_url":"https://github.com/bobrofon","followers_url":"https://api.github.com/users/bobrofon/followers","following_url":"https://api.github.com/users/bobrofon/following{/other_user}","gists_url":"https://api.github.com/users/bobrofon/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrofon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrofon/subscriptions","organizations_url":"https://api.github.com/users/bobrofon/orgs","repos_url":"https://api.github.com/users/bobrofon/repos","events_url":"https://api.github.com/users/bobrofon/events{/privacy}","received_events_url":"https://api.github.com/users/bobrofon/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bobrofon/nsu_prog_labs","description":"Programming course in Novosibirsk State University","fork":false,"url":"https://api.github.com/repos/bobrofon/nsu_prog_labs","forks_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/forks","keys_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/teams","hooks_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/hooks","issue_events_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/events{/number}","events_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/events","assignees_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/assignees{/user}","branches_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/branches{/branch}","tags_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/tags","blobs_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/statuses/{sha}","languages_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/languages","stargazers_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/stargazers","contributors_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/contributors","subscribers_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/subscribers","subscription_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/subscription","commits_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/contents/{+path}","compare_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/merges","archive_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/downloads","issues_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues{/number}","pulls_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls{/number}","milestones_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/milestones{/number}","notifications_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/labels{/name}","releases_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/releases{/id}","deployments_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/deployments","created_at":"2018-09-06T10:53:56Z","updated_at":"2018-10-14T11:50:06Z","pushed_at":"2018-11-13T03:22:13Z","git_url":"git://github.com/bobrofon/nsu_prog_labs.git","ssh_url":"git@github.com:bobrofon/nsu_prog_labs.git","clone_url":"https://github.com/bobrofon/nsu_prog_labs.git","svn_url":"https://github.com/bobrofon/nsu_prog_labs","homepage":"","size":363,"stargazers_count":0,"watchers_count":0,"language":"CMake","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":9,"open_issues":10,"watchers":0,"default_branch":"master"}},"base":{"label":"bobrofon:master","ref":"master","sha":"af1ed5cbacfd06ad1e79d66f16d3561989499cba","user":{"login":"bobrofon","id":2812655,"node_id":"MDQ6VXNlcjI4MTI2NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2812655?v=4","gravatar_id":"","url":"https://api.github.com/users/bobrofon","html_url":"https://github.com/bobrofon","followers_url":"https://api.github.com/users/bobrofon/followers","following_url":"https://api.github.com/users/bobrofon/following{/other_user}","gists_url":"https://api.github.com/users/bobrofon/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrofon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrofon/subscriptions","organizations_url":"https://api.github.com/users/bobrofon/orgs","repos_url":"https://api.github.com/users/bobrofon/repos","events_url":"https://api.github.com/users/bobrofon/events{/privacy}","received_events_url":"https://api.github.com/users/bobrofon/received_events","type":"User","site_admin":false},"repo":{"id":147659938,"node_id":"MDEwOlJlcG9zaXRvcnkxNDc2NTk5Mzg=","name":"nsu_prog_labs","full_name":"bobrofon/nsu_prog_labs","private":false,"owner":{"login":"bobrofon","id":2812655,"node_id":"MDQ6VXNlcjI4MTI2NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/2812655?v=4","gravatar_id":"","url":"https://api.github.com/users/bobrofon","html_url":"https://github.com/bobrofon","followers_url":"https://api.github.com/users/bobrofon/followers","following_url":"https://api.github.com/users/bobrofon/following{/other_user}","gists_url":"https://api.github.com/users/bobrofon/gists{/gist_id}","starred_url":"https://api.github.com/users/bobrofon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobrofon/subscriptions","organizations_url":"https://api.github.com/users/bobrofon/orgs","repos_url":"https://api.github.com/users/bobrofon/repos","events_url":"https://api.github.com/users/bobrofon/events{/privacy}","received_events_url":"https://api.github.com/users/bobrofon/received_events","type":"User","site_admin":false},"html_url":"https://github.com/bobrofon/nsu_prog_labs","description":"Programming course in Novosibirsk State University","fork":false,"url":"https://api.github.com/repos/bobrofon/nsu_prog_labs","forks_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/forks","keys_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/teams","hooks_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/hooks","issue_events_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/events{/number}","events_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/events","assignees_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/assignees{/user}","branches_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/branches{/branch}","tags_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/tags","blobs_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/refs{/sha}","trees_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/statuses/{sha}","languages_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/languages","stargazers_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/stargazers","contributors_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/contributors","subscribers_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/subscribers","subscription_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/subscription","commits_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/commits{/sha}","git_commits_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/git/commits{/sha}","comments_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/comments{/number}","issue_comment_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/comments{/number}","contents_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/contents/{+path}","compare_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/merges","archive_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/downloads","issues_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues{/number}","pulls_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls{/number}","milestones_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/milestones{/number}","notifications_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/labels{/name}","releases_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/releases{/id}","deployments_url":"https://api.github.com/repos/bobrofon/nsu_prog_labs/deployments","created_at":"2018-09-06T10:53:56Z","updated_at":"2018-10-14T11:50:06Z","pushed_at":"2018-11-13T03:22:13Z","git_url":"git://github.com/bobrofon/nsu_prog_labs.git","ssh_url":"git@github.com:bobrofon/nsu_prog_labs.git","clone_url":"https://github.com/bobrofon/nsu_prog_labs.git","svn_url":"https://github.com/bobrofon/nsu_prog_labs","homepage":"","size":363,"stargazers_count":0,"watchers_count":0,"language":"CMake","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":9,"open_issues":10,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21"},"html":{"href":"https://github.com/bobrofon/nsu_prog_labs/pull/21"},"issue":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/21"},"comments":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/bobrofon/nsu_prog_labs/statuses/7fec489e7324f8399801e8927d01e9e76bc937ac"}},"author_association":"OWNER"}}
{"actor":{"display_login":"bobrofon"}}